Java org.apache.lucene.index PostingsEnum fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.index PostingsEnum fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.index PostingsEnum.

The text is from its open source code.

Subclass

org.apache.lucene.index.PostingsEnum has subclasses.
Click this link to see all its subclasses.

Field

shortNONE
Flag to pass to TermsEnum#postings(PostingsEnum,int) if you don't require per-document postings in the returned enum.
shortFREQS
Flag to pass to TermsEnum#postings(PostingsEnum,int) if you require term frequencies in the returned enum.
shortPOSITIONS
Flag to pass to TermsEnum#postings(PostingsEnum,int) if you require term positions in the returned enum.
shortOFFSETS
Flag to pass to TermsEnum#postings(PostingsEnum,int) if you require offsets in the returned enum.
shortPAYLOADS
Flag to pass to TermsEnum#postings(PostingsEnum,int) if you require payloads in the returned enum.
shortALL
Flag to pass to TermsEnum#postings(PostingsEnum,int) to get positions, payloads and offsets in the returned enum

Constructor

PostingsEnum()
Sole constructor.

Method

intadvance(int target)
Advances to the first beyond the current whose document number is greater than or equal to target, and returns the document number itself.
intdocID()
Returns the following:
  • -1 if #nextDoc() or #advance(int) were not called yet.
intendOffset()
Returns end offset for the current position, or -1 if offsets were not indexed.
intfreq()
Returns term frequency in the current document, or 1 if the field was indexed with IndexOptions#DOCS .
BytesRefgetPayload()
Returns the payload at this position, or null if no payload was indexed.
intnextDoc()
Advances to the next document in the set and returns the doc it is currently on, or #NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.
intnextPosition()
Returns the next position, or -1 if positions were not indexed.
intstartOffset()
Returns start offset for the current position, or -1 if offsets were not indexed.