Class LuceneFSTIndexCreator
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.creator.impl.inv.text.LuceneFSTIndexCreator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,TextIndexCreator
public class LuceneFSTIndexCreator extends Object implements TextIndexCreator
This index works only for dictionary enabled columns. It requires entries be added into this index in sorted order and it creates a mapping from sorted entry to the index underneath. This index stores key (column value) to dictionary id as an entry.
-
-
Constructor Summary
Constructors Constructor Description LuceneFSTIndexCreator(File indexDir, String columnName, String[] sortedEntries)This index requires values of the column be added in sorted order.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String document)voidadd(String[] documents, int length)voidclose()voidseal()
-
-
-
Constructor Detail
-
LuceneFSTIndexCreator
public LuceneFSTIndexCreator(File indexDir, String columnName, String[] sortedEntries) throws IOException
This index requires values of the column be added in sorted order. Sorted entries could be passed in through constructor or added through addSortedDictIds function. Index of the sorted entry should correspond to the dictionary id.- Parameters:
indexDir- Index directorycolumnName- Column name for which index is being createdsortedEntries- Sorted entries of the unique values of the column.- Throws:
IOException
-
-
Method Detail
-
add
public void add(String document)
- Specified by:
addin interfaceTextIndexCreator
-
add
public void add(String[] documents, int length)
- Specified by:
addin interfaceTextIndexCreator
-
seal
public void seal() throws IOException- Specified by:
sealin interfaceTextIndexCreator- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-