Method GetTermPositionsEnum
GetTermPositionsEnum(IndexReader, IBits, String, BytesRef)
Returns DocsAndPositionsEnum for the specified
field & term. This will return null
if the field or
term does not exist or positions were not indexed.
Declaration
public static DocsAndPositionsEnum GetTermPositionsEnum(IndexReader r, IBits liveDocs, string field, BytesRef term)
Parameters
Type | Name | Description |
---|---|---|
IndexReader | r | |
IBits | liveDocs | |
System.String | field | |
BytesRef | term |
Returns
Type | Description |
---|---|
DocsAndPositionsEnum |
See Also
GetTermPositionsEnum(IndexReader, IBits, String, BytesRef, DocsAndPositionsFlags)
Returns DocsAndPositionsEnum for the specified
field & term, with control over whether offsets and payloads are
required. Some codecs may be able to optimize
their implementation when offsets and/or payloads are not
required. This will return null
if the field or term does not
exist or positions were not indexed. See
DocsAndPositions(IBits, DocsAndPositionsEnum, DocsAndPositionsFlags).
Declaration
public static DocsAndPositionsEnum GetTermPositionsEnum(IndexReader r, IBits liveDocs, string field, BytesRef term, DocsAndPositionsFlags flags)
Parameters
Type | Name | Description |
---|---|---|
IndexReader | r | |
IBits | liveDocs | |
System.String | field | |
BytesRef | term | |
DocsAndPositionsFlags | flags |
Returns
Type | Description |
---|---|
DocsAndPositionsEnum |