Class RealtimeLuceneTextIndex
- java.lang.Object
-
- org.apache.pinot.segment.local.realtime.impl.invertedindex.RealtimeLuceneTextIndex
-
- All Implemented Interfaces:
Closeable,AutoCloseable,IndexReader,MutableIndex,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, List<String> stopWordsInclude, List<String> stopWordsExclude, boolean useCompoundFile, int maxBufferSizeMB)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.voidadd(String[] documents)Adds a new document, made up of multiple values.voidclose()org.roaringbitmap.buffer.ImmutableRoaringBitmapgetDictIds(String searchQuery)org.roaringbitmap.buffer.MutableRoaringBitmapgetDocIds(String searchQuery)org.apache.lucene.search.SearcherManagergetSearcherManager()-
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.MutableTextIndex
add, add
-
-
-
-
Constructor Detail
-
RealtimeLuceneTextIndex
public RealtimeLuceneTextIndex(String column, File segmentIndexDir, String segmentName, List<String> stopWordsInclude, List<String> stopWordsExclude, boolean useCompoundFile, int maxBufferSizeMB)
Created byMutableSegmentImplfor each column on which text index has been enabled- Parameters:
column- column namesegmentIndexDir- realtime segment consumer dirsegmentName- realtime segment namestopWordsInclude- the words to include in addition to the default stop word liststopWordsExclude- stop words to exclude from default stop words
-
-
Method Detail
-
add
public void add(String document)
Adds a new document.- Specified by:
addin interfaceMutableTextIndex
-
add
public void add(String[] documents)
Adds a new document, made up of multiple values.- 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()
-
-