org.apache.lucene.codecs.lucene41
Class Lucene41PostingsReader

java.lang.Object
  extended by org.apache.lucene.codecs.PostingsReaderBase
      extended by org.apache.lucene.codecs.lucene41.Lucene41PostingsReader
All Implemented Interfaces:
Closeable

public final class Lucene41PostingsReader
extends PostingsReaderBase

Concrete class that reads docId(maybe frq,pos,offset,payloads) list with postings format.

See Also:
for details
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
Lucene41PostingsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo segmentInfo, IOContext ioContext, String segmentSuffix)
          Sole constructor.
 
Method Summary
 void close()
           
 void decodeTerm(long[] longs, DataInput in, FieldInfo fieldInfo, BlockTermState _termState, boolean absolute)
          Actually decode metadata for next term
 DocsEnum docs(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsEnum reuse, int flags)
          Must fully consume state, since after this call that TermState may be reused.
 DocsAndPositionsEnum docsAndPositions(FieldInfo fieldInfo, BlockTermState termState, Bits liveDocs, DocsAndPositionsEnum reuse, int flags)
          Must fully consume state, since after this call that TermState may be reused.
 void init(IndexInput termsIn)
          Performs any initialization, such as reading and verifying the header from the provided terms dictionary IndexInput.
 BlockTermState newTermState()
          Return a newly created empty TermState
 long ramBytesUsed()
          Returns approximate RAM bytes used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lucene41PostingsReader

public Lucene41PostingsReader(Directory dir,
                              FieldInfos fieldInfos,
                              SegmentInfo segmentInfo,
                              IOContext ioContext,
                              String segmentSuffix)
                       throws IOException
Sole constructor.

Throws:
IOException
Method Detail

init

public void init(IndexInput termsIn)
          throws IOException
Description copied from class: PostingsReaderBase
Performs any initialization, such as reading and verifying the header from the provided terms dictionary IndexInput.

Specified by:
init in class PostingsReaderBase
Throws:
IOException

newTermState

public BlockTermState newTermState()
Description copied from class: PostingsReaderBase
Return a newly created empty TermState

Specified by:
newTermState in class PostingsReaderBase

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class PostingsReaderBase
Throws:
IOException

decodeTerm

public void decodeTerm(long[] longs,
                       DataInput in,
                       FieldInfo fieldInfo,
                       BlockTermState _termState,
                       boolean absolute)
                throws IOException
Description copied from class: PostingsReaderBase
Actually decode metadata for next term

Specified by:
decodeTerm in class PostingsReaderBase
Throws:
IOException
See Also:
PostingsWriterBase.encodeTerm(long[], org.apache.lucene.store.DataOutput, org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.BlockTermState, boolean)

docs

public DocsEnum docs(FieldInfo fieldInfo,
                     BlockTermState termState,
                     Bits liveDocs,
                     DocsEnum reuse,
                     int flags)
              throws IOException
Description copied from class: PostingsReaderBase
Must fully consume state, since after this call that TermState may be reused.

Specified by:
docs in class PostingsReaderBase
Throws:
IOException

docsAndPositions

public DocsAndPositionsEnum docsAndPositions(FieldInfo fieldInfo,
                                             BlockTermState termState,
                                             Bits liveDocs,
                                             DocsAndPositionsEnum reuse,
                                             int flags)
                                      throws IOException
Description copied from class: PostingsReaderBase
Must fully consume state, since after this call that TermState may be reused.

Specified by:
docsAndPositions in class PostingsReaderBase
Throws:
IOException

ramBytesUsed

public long ramBytesUsed()
Description copied from class: PostingsReaderBase
Returns approximate RAM bytes used

Specified by:
ramBytesUsed in class PostingsReaderBase


Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.