Heh heh, you say "it worked correctly for me" yet you didn't actually have 
multi-valued data ;-)  Funny.

The only solution right now is to store the max and min into indexed 
single-valued fields at index time.  This is pretty straight-forward to do.  
Even if/when Solr supports sorting on a multi-valued field, I doubt it would 
perform as well as what I suggest.

~ David Smiley
Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/


On Mar 16, 2011, at 10:16 AM, harish.agarwal wrote:

> Hi David,
> 
> It did seem to work correctly for me - we had it running on our production
> indexes for some time and we never noticed any strange sorting behavior. 
> However, many of our multiValued fields are single valued for the majority
> of documents in our index so we may not have noticed the incorrect sorting
> behaviors.
> 
> Regardless, I understand the reasoning behind the restriction, I'm
> interested in getting around it by using a functionQuery to reduce
> multiValued fields to a single value.  It sounds like this isn't possible,
> is that correct?  Ideally I'd like to sort by the maximum value on
> descending sorts and the minimum value on ascending sorts.  Is there any
> movement towards implementing this sort of behavior?
> 
> Best,
> -Harish
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Sorting-on-multiValued-fields-via-function-query-tp2681833p2688288.html
> Sent from the Solr - User mailing list archive at Nabble.com.





Reply via email to