Right, the behavior when sorting on a multivalued field is not defined, so results are unreliable.
There's nothing that I know of that'll allow your sort to occur on the matched terms in a multiValued field. But, again, defining correct behavior here isn't easy. What if you searched for two terms and both terms matched a value in a single document's multiValued field? Which term should it sort by? Sorry, but sorting just doesn't work that way and I don't have any bright ideas how to get this to work as you'd like.... Best Erick On Thu, Nov 3, 2011 at 1:06 PM, vrpar...@gmail.com <vrpar...@gmail.com> wrote: > Thanks Erick, > > what i given 'abc',...etc... its values of one multivalued field in one > document, but might be its confusing. > > lets say, i have one field named Array1 has multivalued=true > > now i want to Search on Array1 , but i want only affected values (which i > can get in "highlighting"), now i also want to sort on filed Array1, > > now whatever be the response should be sorted on only affected values (which > contains search term). > > also without search sorting on Array1 sometimes works fine, sometimes not. > > > Thanks > Vishal Parekh > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/how-to-apply-sort-and-search-both-on-multivalued-field-in-solr-tp3473652p3477747.html > Sent from the Solr - User mailing list archive at Nabble.com. >