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

Hoss Man commented on SOLR-2339:
--------------------------------

I'm not sure the best way to go about this ... we could reimplement the basic 
termcount vs doccount check that use to be done at a higher level before using 
the FieldCache -- but that may be overkill and i'm not convinced we need to 
behave in exactly the same way as before.

At a minimum we should probably start logging a warning if someone does a sort 
on a field that is configured to be multiValued=true.

Alternately: we could consider adding a property to the StringIndex and 
DocTermsIndex classes (on their respective branches) so that FieldCache could 
indicate when it suspects there may be a problem (using simple doccount < 
termcount, or something more complex if it's easy), and Solr could error/log if 
that property is set.

> No error reported when sorting on a field Solr knows you shouldn't sort on.
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-2339
>                 URL: https://issues.apache.org/jira/browse/SOLR-2339
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>             Fix For: 3.1, 4.0
>
>
> In the past, Solr has relied on the underlying FieldCache to throw an error 
> in situations where sorting on a field was not possible.  however LUCENE-2142 
> has changed this, so that FieldCache never throws an error.
> In order to maintain the functionality of past Solr releases (ie: error when 
> users attempt to sort on a field that we known will produce meaningless 
> results) we should add some sort of check at the Solr level.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to