Class RealtimeLuceneTextIndex
- java.lang.Object
-
- org.apache.pinot.segment.local.realtime.impl.invertedindex.RealtimeLuceneTextIndex
-
- All Implemented Interfaces:
Closeable,AutoCloseable,MutableTextIndex,TextIndexReader
public class RealtimeLuceneTextIndex extends Object implements MutableTextIndex
Lucene text index reader supporting near realtime search. An instance of this is created per consuming segment byMutableSegmentImpl. Internally it usesLuceneTextIndexCreatorfor adding documents to the lucene index as and when they are indexed by the consuming segment.
-
-
Constructor Summary
Constructors Constructor Description RealtimeLuceneTextIndex(String column, File segmentIndexDir, String segmentName)Created byMutableSegmentImplfor each column on which text index has been enabled
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String document)Adds a new document.voidclose()org.roaringbitmap.buffer.ImmutableRoaringBitmapgetDictIds(String searchQuery)org.roaringbitmap.buffer.MutableRoaringBitmapgetDocIds(String searchQuery)org.apache.lucene.search.SearcherManagergetSearcherManager()
-
-
-
Constructor Detail
-
RealtimeLuceneTextIndex
public RealtimeLuceneTextIndex(String column, File segmentIndexDir, String segmentName)
Created byMutableSegmentImplfor each column on which text index has been enabled- Parameters:
column- column namesegmentIndexDir- realtime segment consumer dirsegmentName- realtime segment name
-
-
Method Detail
-
add
public void add(String document)
Adds a new document.- Specified by:
addin interfaceMutableTextIndex
-
getDictIds
public org.roaringbitmap.buffer.ImmutableRoaringBitmap getDictIds(String searchQuery)
- Specified by:
getDictIdsin interfaceTextIndexReader
-
getDocIds
public org.roaringbitmap.buffer.MutableRoaringBitmap getDocIds(String searchQuery)
- Specified by:
getDocIdsin interfaceTextIndexReader
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getSearcherManager
public org.apache.lucene.search.SearcherManager getSearcherManager()
-
-