Class LuceneFSTIndexCreator
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.creator.impl.inv.text.LuceneFSTIndexCreator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,FSTIndexCreator,IndexCreator
public class LuceneFSTIndexCreator extends Object implements FSTIndexCreator
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.LuceneFSTIndexCreator(IndexCreationContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String document)voidadd(String[] documents, int length)voidclose()voidseal()-
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.creator.FSTIndexCreator
add, add
-
-
-
-
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
-
LuceneFSTIndexCreator
public LuceneFSTIndexCreator(IndexCreationContext context) throws IOException
- Throws:
IOException
-
-
Method Detail
-
add
public void add(String document)
- Specified by:
addin interfaceFSTIndexCreator
-
add
public void add(String[] documents, int length)
- Specified by:
addin interfaceFSTIndexCreator
-
seal
public void seal() throws IOException- Specified by:
sealin interfaceIndexCreator- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-