Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4687

Lazily initialize TermsEnum in BloomFilterPostingsFormat

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0, 4.1
    • 4.2, 6.0
    • core/codecs
    • None
    • New, Patch Available

    Description

      BloomFilteringPostingsFormat initializes its delegate TermsEnum directly inside the Terms#iterator() call which can be a pretty heavy operation if executed thousands of times. I suspect that bloom filter postings are mainly used for primary keys etc. which in turn is mostly a seekExact. Given that, most of the time we don't even need the delegate termsenum since most of the segments won't contain the key and the bloomfilter will likely return false from seekExact without consulting the delegate.

      Attachments

        1. LUCENE-4687.patch
          8 kB
          Simon Willnauer
        2. LUCENE-4687.patch
          8 kB
          Simon Willnauer

        Activity

          People

            simonw Simon Willnauer
            simonw Simon Willnauer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: