Class FileDictionary
Dictionary represented by a text file.
Format allowed: 1 entry per line:
An entry can be:
- suggestion
- suggestion Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter weight
- suggestion Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter weight Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter payload
NOTE:
- In order to have payload enabled, the first entry has to have a payload
- If the weight for an entry is not specified then a value of 1 is used
- A payload cannot be specified without having the weight specified for an entry
- If the payload for an entry is not specified (assuming payload is enabled) then an empty payload is returned
- An entry cannot have more than two Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiters
Example:
word1 word2 TAB 100 TAB payload1
word3 TAB 101
word4 word3 TAB 102
Inheritance
Assembly: Lucene.Net.Suggest.dll
Syntax
public class FileDictionary : object, IDictionary
Constructors
Name | Description |
---|---|
FileDictionary(Stream) | Creates a dictionary based on an inputstream. Using DEFAULT_FIELD_DELIMITER as the field seperator in a line. NOTE: content is treated as UTF-8 |
FileDictionary(Stream, String) | Creates a dictionary based on an inputstream.
Using NOTE: content is treated as UTF-8 |
FileDictionary(TextReader) | Creates a dictionary based on a reader. Using DEFAULT_FIELD_DELIMITER as the field seperator in a line. |
FileDictionary(TextReader, String) | Creates a dictionary based on a reader.
Using |
Fields
Name | Description |
---|---|
DEFAULT_FIELD_DELIMITER | Tab-delimited fields are most common thus the default, but one can override this via the constructor |
Methods
Name | Description |
---|---|
GetEntryIterator() |