jruby/docs BETA
Navigation
org.apache.lucene.index 131
C AutomatonTermsEnum
C BaseCompositeReader
C BaseTermsEnum
C BinaryDocValues
C ByteVectorValues
C CheckIndex
C CodecReader
C CompositeReader
C CompositeReaderContext
C ConcurrentMergeScheduler
C CorruptIndexException
C DirectoryReader
C DocIDMerger
C DocValues
E DocValuesSkipIndexType
C DocValuesSkipper
E DocValuesType
C DocsWithFieldSet
C EmptyDocValuesProducer
C ExitableDirectoryReader
C FieldInfo
C FieldInfos
C FieldInvertState
C Fields
C FilterBinaryDocValues
C FilterCodecReader
C FilterDirectoryReader
C FilterLeafReader
C FilterMergePolicy
C FilterNumericDocValues
C FilterSortedDocValues
C FilterSortedNumericDocValues
C FilterSortedSetDocValues
C FilteredTermsEnum
C FloatVectorValues
C FreqAndNormBuffer
C Impacts
C ImpactsEnum
I ImpactsSource
C IndexCommit
C IndexDeletionPolicy
C IndexFileNames
C IndexFormatTooNewException
C IndexFormatTooOldException
C IndexNotFoundException
E IndexOptions
C IndexReader
C IndexReaderContext
I IndexSorter
C IndexUpgrader
C IndexWriter
C IndexWriterConfig
I IndexWriterEventListener
I IndexableField
I IndexableFieldType
C KeepLastNCommitsDeletionPolicy
C KeepOnlyLastCommitDeletionPolicy
C KnnVectorValues
C LeafReader
C LeafReaderContext
C LiveIndexWriterConfig
C LogByteSizeMergePolicy
C LogDocMergePolicy
C LogMergePolicy
C MappedMultiFields
C MergePolicy
C MergeRateLimiter
C MergeScheduler
C MergeState
E MergeTrigger
C MultiBits
C MultiDocValues
C MultiFields
C MultiLeafReader
C MultiPostingsEnum
C MultiReader
C MultiTerms
C MultiTermsEnum
C NoDeletionPolicy
C NoMergePolicy
C NoMergeScheduler
C NumericDocValues
C OneMergeWrappingMergePolicy
C OrdTermState
C OrdinalMap
C ParallelCompositeReader
C ParallelLeafReader
C PersistentSnapshotDeletionPolicy
C PointValues
C PostingsEnum
C PrefixCodedTerms
I QueryTimeout
C QueryTimeoutImpl
C ReaderManager
C ReaderUtil
C SegmentCommitInfo
C SegmentInfo
C SegmentInfos
C SegmentOrder
C SegmentReadState
C SegmentReader
C SegmentWriteState
C SerialMergeScheduler
C SimpleMergedSegmentWarmer
C SingleTermsEnum
C SlowCodecReaderWrapper
C SlowImpactsEnum
C SnapshotDeletionPolicy
C SoftDeletesDirectoryReaderWrapper
C SoftDeletesRetentionMergePolicy
C SortFieldProvider
C SortedDocValues
C SortedNumericDocValues
C SortedSetDocValues
C Sorter
C SortingCodecReader
C StandardDirectoryReader
C StoredFieldVisitor
C StoredFields
C Term
C TermState
C TermStates
C TermVectors
C Terms
C TermsEnum
C TieredMergePolicy
I TwoPhaseCommit
C TwoPhaseCommitTool
C UpgradeIndexMergePolicy
E VectorEncoding
E VectorSimilarityFunction
ImpactsEnum — members 0+
from DocIdSetIterator
F NO_MORE_DOCS int
M advance(target) int
M cost() long
M doc_id() int
M doc_id_run_end() int
C into_bit_set(up_to, bit_set, offset)
M next_doc() int
from ImpactsSource
C advance_shallow(target)
M impacts() Impacts
from PostingsEnum
F ALL short
F FREQS short
F NONE short
F OFFSETS short
F PAYLOADS short
F POSITIONS short
M end_offset() int
M freq() int
M next_position() int
C next_postings(up_to, buffer)
M payload() BytesRef
M start_offset() int

org.apache.lucene.index.ImpactsEnum

class abstract extends PostingsEnum implements ImpactsSource 0 members

Extension of PostingsEnum which also provides information about upcoming impacts.

Inherited

from DocIdSetIterator

fieldtypenote
NO_MORE_DOCS int When returned by #nextDoc(), #advance(int) and #docID() it means there are no more docs in the iterator.

advance

int advance ( int target )
Java: advance(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. Exhausts the iterator and returns #NO_MORE_DOCS if target is greater than the highest document number in the set.

The behavior of this method is undefined when called with target ≤ current , or after the iterator has exhausted. Both cases may result in unpredicted behavior.

When target > current it behaves as if written:

int advance(int target) {
  int doc;
  while ((doc = nextDoc()) < target) {
  }
  return doc;
}
Some implementations are considerably more efficient than that.

NOTE: this method may be called with #NO_MORE_DOCS for efficiency by some Scorers. If your implementation cannot efficiently determine that it should exhaust, it is recommended that you check for that value in each call to this method.

cost

long cost ( )
Java: cost()

Returns the estimated cost of this DocIdSetIterator.

This is generally an upper bound of the number of documents this iterator might match, but may be a rough heuristic, hardcoded value, or otherwise completely inaccurate.

doc_id

int doc_id ( )
Java: docID()

Returns the following:

  • -1 if #nextDoc() or #advance(int) were not called yet.
  • #NO_MORE_DOCS if the iterator has exhausted.
  • Otherwise it should return the doc ID it is currently on.

doc_id_run_end

int doc_id_run_end ( )
Java: docIDRunEnd()

Returns the end of the run of consecutive doc IDs that match this DocIdSetIterator and that contains the current #docID(), that is: one plus the last doc ID of the run.

  1. The returned doc is greater than #docID().
  2. All docs in range [docID(), docIDRunEnd()) match this iterator.
  3. The current position of this iterator is not affected by calling #docIDRunEnd().

Note: It is illegal to call this method when the iterator is exhausted or not positioned.

The default implementation assumes runs of a single doc ID and returns #docID()) + 1.

into_bit_set

into_bit_set ( int up_to, FixedBitSet bit_set, int offset )
Java: intoBitSet(int upTo, org.apache.lucene.util.FixedBitSet bitSet, int offset)

Load doc IDs into a FixedBitSet. This should behave exactly as if implemented as below, which is the default implementation:

for (int doc = docID(); doc < upTo; doc = nextDoc()) {
  bitSet.set(doc - offset);
}

Note: offset must be less than or equal to the current doc ID. Behaviour is undefined if this iterator is unpositioned.

Note: It is important not to clear bits from bitSet that may be already set.

Note: offset may be negative.

next_doc

int next_doc ( )
Java: nextDoc()

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.

from ImpactsSource

advance_shallow

advance_shallow ( int target )
Java: advanceShallow(int target)

Shallow-advance to target. This is cheaper than calling DocIdSetIterator#advance(int) and allows further calls to #getImpacts() to ignore doc IDs that are less than target in order to get more precise information about impacts. This method may not be called on targets that are less than the current DocIdSetIterator#docID(). After this method has been called, DocIdSetIterator#nextDoc() may not be called if the current doc ID is less than target - 1 and DocIdSetIterator#advance(int) may not be called on targets that are less than target.

impacts

Impacts impacts ( )
Java: getImpacts() · also: get_impacts

Get information about upcoming impacts for doc ids that are greater than or equal to the maximum of DocIdSetIterator#docID() and the last target that was passed to #advanceShallow(int). This method may not be called on an unpositioned iterator on which #advanceShallow(int) has never been called. NOTE: advancing this iterator may invalidate the returned impacts, so they should not be used after the iterator has been advanced.

from PostingsEnum

fieldtypenote
ALL short Flag to pass to TermsEnum#postings(PostingsEnum, int) to get positions, payloads and offsets in the returned enum
FREQS short Flag to pass to TermsEnum#postings(PostingsEnum, int) if you require term frequencies in the returned enum.
NONE short Flag to pass to TermsEnum#postings(PostingsEnum, int) if you don't require per-document postings in the returned enum.
OFFSETS short Flag to pass to TermsEnum#postings(PostingsEnum, int) if you require offsets in the returned enum.
PAYLOADS short Flag to pass to TermsEnum#postings(PostingsEnum, int) if you require payloads in the returned enum.
POSITIONS short Flag to pass to TermsEnum#postings(PostingsEnum, int) if you require term positions in the returned enum.

end_offset

int end_offset ( )
Java: endOffset()

Returns end offset for the current position, or -1 if offsets were not indexed.

freq

int freq ( )
Java: freq()

Returns term frequency in the current document, or 1 if the field was indexed with IndexOptions#DOCS. Do not call this before #nextDoc is first called, nor after #nextDoc returns DocIdSetIterator#NO_MORE_DOCS.

NOTE: if the PostingsEnum was obtain with #NONE, the result of this method is undefined.

next_position

int next_position ( )
Java: nextPosition()

Returns the next position, or -1 if positions were not indexed. Calling this more than #freq() times is undefined.

next_postings

next_postings ( int up_to, DocAndFloatFeatureBuffer buffer )
Java: nextPostings(int upTo, org.apache.lucene.search.DocAndFloatFeatureBuffer buffer)

Fill a buffer of doc IDs and frequencies with some number of doc IDs and their corresponding frequencies, starting at the current doc ID, and ending before upTo. Because it starts on the current doc ID, it is illegal to call this method if the current doc ID is -1.

An empty buffer after this method returns indicates that there are no postings left between the current doc ID and upTo.

Implementations should ideally fill the buffer with a number of entries comprised between 8 and a couple hundreds, to keep heap requirements contained, while still being large enough to enable operations on the buffer to auto-vectorize efficiently.

The default implementation is provided below:

int batchSize = 16; // arbitrary
buffer.growNoCopy(batchSize);
int size = 0;
for (int doc = docID(); doc < upTo && size < batchSize; doc = nextDoc()) {
  buffer.docs[size] = doc;
  buffer.freqs[size] = freq();
  ++size;
}
buffer.size = size;

NOTE: The provided DocAndFloatFeatureBuffer should not hold references to internal data structures.

payload

BytesRef payload ( )
Java: getPayload() · also: get_payload

Returns the payload at this position, or null if no payload was indexed. You should not modify anything (neither members of the returned BytesRef nor bytes in the byte[]).

start_offset

int start_offset ( )
Java: startOffset()

Returns start offset for the current position, or -1 if offsets were not indexed.

this work for additional information regarding copyright ownership.