Class DelegatingBloomFilterFieldsProducer

java.lang.Object
org.apache.lucene.index.Fields
org.apache.lucene.codecs.FieldsProducer
org.elasticsearch.index.codec.bloomfilter.DelegatingBloomFilterFieldsProducer
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<String>

public class DelegatingBloomFilterFieldsProducer extends org.apache.lucene.codecs.FieldsProducer
A FieldsProducer that uses a Bloom filter for fast term existence checks before delegating exact lookups to the underlying FieldsProducer. This avoids a potentially expensive seek operations for non-existent terms.
  • Constructor Details

    • DelegatingBloomFilterFieldsProducer

      public DelegatingBloomFilterFieldsProducer(org.apache.lucene.codecs.FieldsProducer delegate, BloomFilter bloomFilter)
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class org.apache.lucene.codecs.FieldsProducer
      Throws:
      IOException
    • checkIntegrity

      public void checkIntegrity() throws IOException
      Specified by:
      checkIntegrity in class org.apache.lucene.codecs.FieldsProducer
      Throws:
      IOException
    • iterator

      public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
      Specified by:
      iterator in class org.apache.lucene.index.Fields
    • terms

      public org.apache.lucene.index.Terms terms(String field) throws IOException
      Specified by:
      terms in class org.apache.lucene.index.Fields
      Throws:
      IOException
    • size

      public int size()
      Specified by:
      size in class org.apache.lucene.index.Fields