dsmiley commented on a change in pull request #884: LUCENE-8980: optimise SegmentTermsEnum.seekExact performance URL: https://github.com/apache/lucene-solr/pull/884#discussion_r325967263
########## File path: lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnum.java ########## @@ -321,6 +321,10 @@ public boolean seekExact(BytesRef target) throws IOException { throw new IllegalStateException("terms index was not loaded"); } + if (fr.size() > 0 && (target.compareTo(fr.getMin()) < 0 || target.compareTo(fr.getMax()) > 0)) { Review comment: +1 Interestingly, while working on UniformSplit PostingsFormat we identified the value in this -- `org.apache.lucene.codecs.uniformsplit.BlockReader#seekExact(org.apache.lucene.util.BytesRef)` If you tend to add data very sequentially in terms of IDs (common for many apps, log data, and especially during full indexing), this can be very noticeable since most segments will rule out the ID completely. Still, to be sure, we should run https://github.com/mikemccand/luceneutil/ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org