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
FieldsModifier and TypeFieldDescriptionprotected final FSTCompiler<Long> protected final IntsRefBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a [block key - block file pointer] entry to the dictionary.build()Builds the immutableIndexDictionaryfor the added entries.
-
Field Details
-
fstCompiler
-
scratchInts
-
-
Constructor Details
-
Builder
- Throws:
IOException
-
-
Method Details
-
add
Description copied from interface:IndexDictionary.BuilderAdds a [block key - block file pointer] entry to the dictionary.The Uniform Split technique adds block keys in the dictionary. See
BlockReaderandTermBytesfor 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
PositiveIntOutputsforFST.- Specified by:
addin 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.BuilderBuilds the immutableIndexDictionaryfor the added entries.- Specified by:
buildin interfaceIndexDictionary.Builder- Throws:
IOException
-