Class LuceneTextIndexReader
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.readers.text.LuceneTextIndexReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,IndexReader,TextIndexReader
public class LuceneTextIndexReader extends Object implements TextIndexReader
This is used to read/search the Lucene text index. WhenImmutableSegmentLoaderloads the segment, it also loads (mmaps) the Lucene text index if the segment has TEXT column(s).
-
-
Constructor Summary
Constructors Constructor Description LuceneTextIndexReader(String column, File indexDir, int numDocs, Map<String,String> textIndexProperties)As part of loading the segment in ImmutableSegmentLoader, we load the text index (per column if it exists) and store the reference inPhysicalColumnIndexContainersimilar to how it is done for other types of indexes.LuceneTextIndexReader(String column, File indexDir, int numDocs, TextIndexConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()When we destroy the loaded ImmutableSegment, all the indexes (for each column) are destroyed and as part of that we release the text indexorg.roaringbitmap.buffer.ImmutableRoaringBitmapgetDictIds(String searchQuery)org.roaringbitmap.buffer.MutableRoaringBitmapgetDocIds(String searchQuery)
-
-
-
Constructor Detail
-
LuceneTextIndexReader
public LuceneTextIndexReader(String column, File indexDir, int numDocs, TextIndexConfig config)
-
LuceneTextIndexReader
public LuceneTextIndexReader(String column, File indexDir, int numDocs, @Nullable Map<String,String> textIndexProperties)
As part of loading the segment in ImmutableSegmentLoader, we load the text index (per column if it exists) and store the reference inPhysicalColumnIndexContainersimilar to how it is done for other types of indexes.- Parameters:
column- column nameindexDir- segment index directorynumDocs- number of documents in the segment
-
-
Method Detail
-
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() throws IOExceptionWhen we destroy the loaded ImmutableSegment, all the indexes (for each column) are destroyed and as part of that we release the text index- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-