Class FilteringPostingList
java.lang.Object
org.apache.cassandra.index.sai.disk.v1.postings.FilteringPostingList
- All Implemented Interfaces:
Closeable,AutoCloseable,PostingList
A wrapper that iterates over a delegate
PostingList, filtering out postings at
positions that are not present in a provided filter.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.index.sai.postings.PostingList
PostingList.EmptyPostingList -
Field Summary
Fields inherited from interface org.apache.cassandra.index.sai.postings.PostingList
EMPTY, END_OF_STREAM, OFFSET_NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionFilteringPostingList(org.apache.lucene.util.FixedBitSet filter, OrdinalPostingList delegate) -
Method Summary
Modifier and TypeMethodDescriptionlongadvance(long targetRowID) Advances to the first row ID beyond the current that is greater than or equal to the target, and returns that row ID.voidclose()longRetrieves the next segment row ID, not including row IDs that have been returned byPostingList.advance(long).longsize()Returns the upper bound of postings in the list.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.index.sai.postings.PostingList
maximum, minimum
-
Constructor Details
-
FilteringPostingList
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacePostingList
-
nextPosting
Description copied from interface:PostingListRetrieves the next segment row ID, not including row IDs that have been returned byPostingList.advance(long).- Specified by:
nextPostingin interfacePostingList- Returns:
- the segment row ID of the next match
- Throws:
IOException
-
size
public long size()Description copied from interface:PostingListReturns the upper bound of postings in the list. During a merge individual postings may be de-duplicated, so we can't return the exact size only the upper bound of the size.- Specified by:
sizein interfacePostingList
-
advance
Description copied from interface:PostingListAdvances to the first row ID beyond the current that is greater than or equal to the target, and returns that row ID. Exhausts the iterator and returnsPostingList.END_OF_STREAMif the target is greater than the highest row ID.Note: Callers must use the return value of this method before calling
PostingList.nextPosting(), as calling that method will return the next posting, not the one to which we have just advanced.- Specified by:
advancein interfacePostingList- Parameters:
targetRowID- target row ID to advance to- Returns:
- first segment row ID which is >= the target row ID or
PostingList.END_OF_STREAMif one does not exist - Throws:
IOException
-