Class RealtimeInvertedIndex
- java.lang.Object
-
- org.apache.pinot.segment.local.realtime.impl.invertedindex.RealtimeInvertedIndex
-
- All Implemented Interfaces:
Closeable,AutoCloseable,IndexReader,MutableIndex,MutableInvertedIndex,InvertedIndexReader<org.roaringbitmap.buffer.MutableRoaringBitmap>
public class RealtimeInvertedIndex extends Object implements MutableInvertedIndex
Real-time bitmap based inverted index reader which allows adding values on the fly.This class is thread-safe for single writer multiple readers.
-
-
Constructor Summary
Constructors Constructor Description RealtimeInvertedIndex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int dictId, int docId)Adds the document id to the bitmap of the given dictionary id.voidclose()org.roaringbitmap.buffer.MutableRoaringBitmapgetDocIds(int dictId)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.segment.spi.index.mutable.MutableInvertedIndex
add, add
-
-
-
-
Method Detail
-
add
public void add(int dictId, int docId)Adds the document id to the bitmap of the given dictionary id.- Specified by:
addin interfaceMutableInvertedIndex
-
getDocIds
public org.roaringbitmap.buffer.MutableRoaringBitmap getDocIds(int dictId)
- Specified by:
getDocIdsin interfaceInvertedIndexReader<org.roaringbitmap.buffer.MutableRoaringBitmap>
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-