[ 
https://issues.apache.org/jira/browse/SOLR-2522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14726106#comment-14726106
 ] 

David Smiley commented on SOLR-2522:
------------------------------------

You make good points; I'm glad we're having this interaction.  I can see there 
shouldn't be an extra seek() now.

One possible improvement is to avoid a double-lookup of the ordinal -- first 
with exists(doc) and then by doc(0).

bq. Hmmm... the start of your comment mentioned that you thought these changes 
would be a perf improvement, but the wording at the end your comment ("will 
fail (i tried)") sounds like you're saying you found/demonstrated a bug ... but 
it's not exactly clear to me what exactly the bug is or how to reproduce it?

Sorry, I could have been more clear.  I mean that if (somehow) longVal(doc) 
gets called when the document in fact has no value then BytesRef will have 0 
length and NumericUtils.prefixCodedToLong will throw an exception.  I did test 
that NumericUtils.prefixCodedToLong throws an exception when given a 0 length 
BytesRef  (executed via a Groovy shell).  I will file a bug report and link to 
this issue to show how to trigger this error.


> add syntax for selecting the min or max of a multivalued field in value 
> source functions
> ----------------------------------------------------------------------------------------
>
>                 Key: SOLR-2522
>                 URL: https://issues.apache.org/jira/browse/SOLR-2522
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Bill Bell
>            Assignee: Hoss Man
>             Fix For: 5.3, Trunk
>
>         Attachments: SOLR-2522.patch, SOLR-2522.patch, SOLR-2522.patch
>
>
> Initial request...
> bq. Switch max() and min() functions to work on multiValued fields so we can 
> do sort=min(fieldname) asc and the sort would work on multiValued fields...
> ...this specific syntax has been spun off into SOLR-7853, but the underlying 
> functionality s being implemented here using a new optional second argument 
> to the {{field()}} function: {{field(multivalued_field_name,min)}} and 
> {{field(multivalued_field_name,max)}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to