This is for Sitecore 8.1 Update 3, using Solr 5.5.
It appears that in a Multilist with Search Field, if the field has two or more items currently selected (it does not matter whether the item has been saved or not), the search request that is sent ends up generating an improper Solr query that causes no results to be returned.
For example, here is a query that is generated when trying to perform a search on the field:
((-_group:(8ef752a6793c446d849aa5a0b455457a) AND -_group:(da0d9a141798455da6a66994742e48c8)) AND ((((_content:(roger) OR _name:(roger) OR _displayname:(roger)) AND _path:(79e09ae03e614e069349b05ca2aada81)) AND _template:(8904e4c272604056b65ddb881a06de95)) AND _latestversion:(True)))
It's the first grouping that is attempting to exclude already selected items within the field that causes this search to fail. We can manually modify the query to "fix" it and return what we want:
First we can negate the grouping
-((-_group:(8ef752a6793c446d849aa5a0b455457a) AND -_group:(da0d9a141798455da6a66994742e48c8)) AND ((((_content:(roger) OR _name:(roger) OR _displayname:(roger)) AND _path:(79e09ae03e614e069349b05ca2aada81)) AND _template:(8904e4c272604056b65ddb881a06de95)) AND _latestversion:(True)))
Or we can arrange the grouping to be "correct":
( -_group:(beff3037e34941e4ae4608d7524118df) AND -_group:(a5b7d1a6f38148189f0f88aeb84162fc) AND -_group:(26e8bb2e727746c89c2577dda04afa54) AND -_group:(c4ff9b4b053d4e749758ec1261f35124) AND ((((_content:(roger) OR _name:(roger) OR _displayname:(roger)) AND _path:(79e09ae03e614e069349b05ca2aada81)) AND _template:(8904e4c272604056b65ddb881a06de95)) AND _latestversion:(True)) )
Essentially, Sitecore is incorrectly grouping the "_group" fields together so this problem will only show up when one more than one item is selected.
I've fixed this issue for now by modifying the client side javascript to no longer send the selected id's to the search handler:
\sitecore\shell\Controls\BucketList\BucketList.js, line 140
self.getSelectedIdsFilter = function (){
return "";
//return [].slice.call($(self.clientId + '_selected').options, 0)
// .map(function (option) { return "&-id=" + option.value })
// .join('');
};
Doing the above modification to the client-side JS allows me to correctly search on a Multilist with Search field. However, I consider it a hack and was wondering if anyone had a "proper" solution to this problem? I looked into overriding the default search handler, but the "problem code" that is responsible for taking the search request and parsing it into a solr query seemed especially difficult to replace/modify due to how it was architected. .