[ https://issues.apache.org/jira/browse/LUCENE-7713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15888405#comment-15888405 ]
Adrien Grand commented on LUCENE-7713: -------------------------------------- I played with sorting the geonames dataset on the population field and disabling the compareBottom call after {{numHits}} documents have been collected, which reduced the query time from 92ms to 17ms (5x faster) so I think such a change could yield serious speedups for users who would still want to compute the total number of hits (which means early termination is not an option). > Optimize TopFieldDocCollector for the sorted case > ------------------------------------------------- > > Key: LUCENE-7713 > URL: https://issues.apache.org/jira/browse/LUCENE-7713 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Adrien Grand > Priority: Minor > > When the sort order is a prefix of the index sort order, > {{TopFieldDocCollector}} could skip reading doc values and comparing them > against the bottom value after {{numHits}} documents have been collected, and > just count matches. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org