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

Uwe Schindler commented on LUCENE-4368:
---------------------------------------

If you want to callect *all* hits, its stupid to use TopDocs at all - because 
TopDocs is made to get "few" top-scoring documents. To collect *all* hits, 
implement your own Collector subclass and the score would be unimportant, so 
the whole overhead of score calculation is uneeded.
                
> make sentinel object in HitQueue a singleton?
> ---------------------------------------------
>
>                 Key: LUCENE-4368
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4368
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: 4.0-BETA
>            Reporter: Steven Bethard
>            Assignee: Uwe Schindler
>
> Via jvisualvm, I see that one of my Lucene processes is spending a lot of 
> time in HitQueue.getSentinelObject. That's a very simple method that 
> currently looks like:
>   protected ScoreDoc getSentinelObject() {
>     return new ScoreDoc(Integer.MAX_VALUE, Float.NEGATIVE_INFINITY);
>   }
> Since the same sentinel is always returned, perhaps the sentinel should be 
> declared as a static variable on HitQueue and then getSentinelObject() would 
> just return that static value?

--
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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to