Interface IndexDictionary.Builder
-
- All Known Implementing Classes:
FSTDictionary.Builder
- Enclosing interface:
- IndexDictionary
public static interface IndexDictionary.BuilderBuilds an immutableIndexDictionary.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(BytesRef blockKey, long blockFilePointer)Adds a [block key - block file pointer] entry to the dictionary.IndexDictionarybuild()Builds the immutableIndexDictionaryfor the added entries.
-
-
-
Method Detail
-
add
void add(BytesRef blockKey, long blockFilePointer) throws IOException
Adds 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.- 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
IndexDictionary build() throws IOException
Builds the immutableIndexDictionaryfor the added entries.- Throws:
IOException
-
-