Class LuceneOptimizedPostingsReader

java.lang.Object
org.apache.lucene.codecs.PostingsReaderBase
org.apache.lucene.codecs.lucene84.LuceneOptimizedPostingsReader
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.lucene.util.Accountable

public final class LuceneOptimizedPostingsReader extends org.apache.lucene.codecs.PostingsReaderBase
Concrete class that reads docId(maybe frq,pos,offset,payloads) list with postings format. Borrowed from Lucene. This implementation skips the reading and validation of checksums to limit the data required to be read to process a query.
  • Field Summary

    Fields inherited from interface org.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE
  • Constructor Summary

    Constructors
    Constructor
    Description
    LuceneOptimizedPostingsReader(org.apache.lucene.index.SegmentReadState state)
    Sole constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    void
    decodeTerm(org.apache.lucene.store.DataInput in, org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.codecs.BlockTermState _termState, boolean absolute)
     
    org.apache.lucene.index.ImpactsEnum
    impacts(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.codecs.BlockTermState state, int flags)
     
    void
    init(org.apache.lucene.store.IndexInput termsIn, org.apache.lucene.index.SegmentReadState state)
     
    org.apache.lucene.codecs.BlockTermState
     
    org.apache.lucene.index.PostingsEnum
    postings(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.codecs.BlockTermState termState, org.apache.lucene.index.PostingsEnum reuse, int flags)
     
    long
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.lucene.util.Accountable

    getChildResources
  • Constructor Details

    • LuceneOptimizedPostingsReader

      public LuceneOptimizedPostingsReader(org.apache.lucene.index.SegmentReadState state) throws IOException
      Sole constructor.
      Parameters:
      state - state
      Throws:
      IOException - exception
  • Method Details

    • init

      public void init(org.apache.lucene.store.IndexInput termsIn, org.apache.lucene.index.SegmentReadState state) throws IOException
      Specified by:
      init in class org.apache.lucene.codecs.PostingsReaderBase
      Throws:
      IOException
    • newTermState

      public org.apache.lucene.codecs.BlockTermState newTermState()
      Specified by:
      newTermState in class org.apache.lucene.codecs.PostingsReaderBase
    • 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.PostingsReaderBase
      Throws:
      IOException
    • decodeTerm

      public void decodeTerm(org.apache.lucene.store.DataInput in, org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.codecs.BlockTermState _termState, boolean absolute) throws IOException
      Specified by:
      decodeTerm in class org.apache.lucene.codecs.PostingsReaderBase
      Throws:
      IOException
    • postings

      public org.apache.lucene.index.PostingsEnum postings(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.codecs.BlockTermState termState, org.apache.lucene.index.PostingsEnum reuse, int flags) throws IOException
      Specified by:
      postings in class org.apache.lucene.codecs.PostingsReaderBase
      Throws:
      IOException
    • impacts

      public org.apache.lucene.index.ImpactsEnum impacts(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.codecs.BlockTermState state, int flags) throws IOException
      Specified by:
      impacts in class org.apache.lucene.codecs.PostingsReaderBase
      Throws:
      IOException
    • ramBytesUsed

      public long ramBytesUsed()
    • checkIntegrity

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

      public String toString()
      Overrides:
      toString in class Object