lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (SOLR-11854) multiValued PrimitiveFieldType should implicitly sort on min/max based on the asc/desc keyword
Date Tue, 16 Jan 2018 19:55:01 GMT


ASF subversion and git services commented on SOLR-11854:

Commit 3a10282a175d426523124ffda3db6c3646e795a0 in lucene-solr's branch refs/heads/branch_7x
from Chris Hostetter
[;h=3a10282 ]

SOLR-11854: multivalued primative fields can now be sorted by implicitly choosing the min/max
value for asc/desc sort orders

(cherry picked from commit e2bba98dfde0420da84eb740282966ee5624b4d1)

> multiValued PrimitiveFieldType should implicitly sort on min/max based on the asc/desc
> ----------------------------------------------------------------------------------------------
>                 Key: SOLR-11854
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>            Priority: Major
>         Attachments: SOLR-11854.patch, SOLR-11854.patch
> Back in SOLR-2522, I added new syntax for (numeric) fields such that the {{field(someMultivaluedFieldName,min|max)}}
syntax could be used to select either the min or max value of a multivalued (docvalues) field
for use in other functions -- or for sorting.
> A little while back, it occured to me that a good "default" behavior for all primative
multivalued fields would be:
> * automatically use the "min" value when {{sort=someMultivaluedFieldName asc}} is attempted
> * automatically use the "max" value when {{sort=someMultivaluedFieldName desc}} is attempted
> These defaults seem like they would be a big improvement over the current "throw an error"
default behavior -- especially since it naturally reduces down in the trivial case where all
docs have at most 1 value anyway -- and would align in practice with how most people I've
talked to seem to think "sorting on a multivalued field" should work in theory.   If users
don't like these dafaults, they can always use the explicit {{field(foo,min|max)}} syntax
instead (ex: if users always want multivalued fields to sort on the 'min' value, regardless
of the asc|desc selector)
> I've been experimenting with this off and on for a while, working up a POC patch -- I
think it's worth doing (details to follow in comment)

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message