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

Shai Erera commented on LUCENE-5232:
------------------------------------

bq. just have a HuperDuperTopFieldCollector.create() 

We have that, it's called TopFieldCollector.create().

bq. How about never computing maxScore when sorting by field

+1. We can even offer such Collector.

Maybe what we need is to remove that .search() method from IndexSearcher API, 
document that the "sort" methods never compute scores and that you should use 
TopFieldCollector.create() if you wish to do that?

As for the specialization, I agree with Mike that we should decouple the two. I 
don't know how costly it is, in a real live system, to have a few extra 'ifs' 
(I don't think luceneutil lets you check that?), but I'm sure that computing a 
score is in most cases redundant work when sorting by a field and therefore 
should be avoided. Perhaps we should remove the specializations in favor of the 
added 'ifs' and let someone write his own Collector if he's worried about perf?
                
> Remove doMaxScore from indexsearcher, collector specializations, etc
> --------------------------------------------------------------------
>
>                 Key: LUCENE-5232
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5232
>             Project: Lucene - Core
>          Issue Type: Sub-task
>            Reporter: Robert Muir
>             Fix For: 5.0
>
>
> I think we should just compute doMaxScore whenever doDocScores = true.
> This would remove 4 collector specializations and remove a boolean parameter 
> from 4 indexsearcher methods.
> We can just do this in 5.0 I think.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to