Package org.apache.lucene.index
Interface ImpactsSource
-
- All Known Implementing Classes:
ImpactsEnum
,SlowImpactsEnum
public interface ImpactsSource
Source ofImpacts
.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
advanceShallow(int target)
Shallow-advance totarget
.Impacts
getImpacts()
Get information about upcoming impacts for doc ids that are greater than or equal to the maximum ofDocIdSetIterator.docID()
and the last target that was passed toadvanceShallow(int)
.
-
-
-
Method Detail
-
advanceShallow
void advanceShallow(int target) throws IOException
Shallow-advance totarget
. This is cheaper than callingDocIdSetIterator.advance(int)
and allows further calls togetImpacts()
to ignore doc IDs that are less thantarget
in order to get more precise information about impacts. This method may not be called on targets that are less than the currentDocIdSetIterator.docID()
. After this method has been called,DocIdSetIterator.nextDoc()
may not be called if the current doc ID is less thantarget - 1
andDocIdSetIterator.advance(int)
may not be called on targets that are less thantarget
.- Throws:
IOException
-
getImpacts
Impacts getImpacts() throws IOException
Get information about upcoming impacts for doc ids that are greater than or equal to the maximum ofDocIdSetIterator.docID()
and the last target that was passed toadvanceShallow(int)
. This method may not be called on an unpositioned iterator on whichadvanceShallow(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.- Throws:
IOException
-
-