Interface IndexDictionary
-
- All Known Implementing Classes:
FSTDictionary
public interface IndexDictionaryImmutable stateless index dictionary kept in RAM.Implementations must be immutable.
Use
IndexDictionary.Builderto build theIndexDictionary.Create a stateful
IndexDictionary.Browserto seek a term in thisIndexDictionaryand get its corresponding block file pointer to the terms block file.There is a single implementation of this interface,
FSTDictionary. However this interface allows you to plug easily a new kind of index dictionary to experiment and improve the existing one.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIndexDictionary.BrowserStatefulIndexDictionary.Browserto seek a term in thisIndexDictionaryand get its corresponding block file pointer in the block file.static interfaceIndexDictionary.BrowserSupplierSupplier for a new statefulIndexDictionary.Browsercreated on the immutableIndexDictionary.static interfaceIndexDictionary.BuilderBuilds an immutableIndexDictionary.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IndexDictionary.Browserbrowser()Creates a newIndexDictionary.Browser.voidwrite(DataOutput output, BlockEncoder blockEncoder)Writes this dictionary to the provided output.
-
-
-
Method Detail
-
write
void write(DataOutput output, BlockEncoder blockEncoder) throws IOException
Writes this dictionary to the provided output.- Parameters:
blockEncoder- TheBlockEncoderfor specific encoding of this index dictionary; or null if none.- Throws:
IOException
-
browser
IndexDictionary.Browser browser() throws IOException
Creates a newIndexDictionary.Browser.- Throws:
IOException
-
-