Class FSTDictionary.Builder
java.lang.Object
org.apache.lucene.codecs.uniformsplit.FSTDictionary.Builder
- All Implemented Interfaces:
IndexDictionary.Builder
- Enclosing class:
- FSTDictionary
Builds an immutable
FSTDictionary
.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final FSTCompiler<Long>
protected final IntsRefBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a [block key - block file pointer] entry to the dictionary.build()
Builds the immutableIndexDictionary
for the added entries.
-
Field Details
-
fstCompiler
-
scratchInts
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
add
Description copied from interface:IndexDictionary.Builder
Adds a [block key - block file pointer] entry to the dictionary.The Uniform Split technique adds block keys in the dictionary. See
BlockReader
andTermBytes
for more info about block key and minimal distinguishing prefix (MDP).All block keys are added in strictly increasing order of the block file pointers, this allows long encoding optimizations such as with
PositiveIntOutputs
forFST
.- Specified by:
add
in interfaceIndexDictionary.Builder
- Parameters:
blockKey
- The block key which is the minimal distinguishing prefix (MDP) of the first term of a block.blockFilePointer
- Non-negative file pointer to the start of the block in the block file.- Throws:
IOException
-
build
Description copied from interface:IndexDictionary.Builder
Builds the immutableIndexDictionary
for the added entries.- Specified by:
build
in interfaceIndexDictionary.Builder
- Throws:
IOException
-