C# Class Lucene.Net.Search.Suggest.FileDictionary

Dictionary represented by a text file.

Format allowed: 1 entry per line:

An entry can be:

suggestion suggestion fieldDelimiter weight suggestion fieldDelimiter weight fieldDelimiter payload where the default fieldDelimiter is DEFAULT_FIELD_DELIMITER (a tab)

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 fieldDelimiters

Example: word1 word2 TAB 100 TAB payload1 word3 TAB 101 word4 word3 TAB 102
Inheritance: IDictionary
Exibir arquivo Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
FileDictionary ( Stream dictFile ) : Lucene.Net.Search.Spell

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 dictFile, string fieldDelimiter ) : Lucene.Net.Search.Spell

Creates a dictionary based on an inputstream. Using fieldDelimiter to seperate out the fields in a line.

NOTE: content is treated as UTF-8

FileDictionary ( TextReader reader ) : Lucene.Net.Search.Spell

Creates a dictionary based on a reader. Using DEFAULT_FIELD_DELIMITER as the field seperator in a line.

FileDictionary ( TextReader reader, string fieldDelimiter ) : Lucene.Net.Search.Spell

Creates a dictionary based on a reader. Using fieldDelimiter to seperate out the fields in a line.

Method Details

FileDictionary() public method

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

public FileDictionary ( Stream dictFile ) : Lucene.Net.Search.Spell
dictFile Stream
return Lucene.Net.Search.Spell

FileDictionary() public method

Creates a dictionary based on an inputstream. Using fieldDelimiter to seperate out the fields in a line.

NOTE: content is treated as UTF-8

public FileDictionary ( Stream dictFile, string fieldDelimiter ) : Lucene.Net.Search.Spell
dictFile Stream
fieldDelimiter string
return Lucene.Net.Search.Spell

FileDictionary() public method

Creates a dictionary based on a reader. Using DEFAULT_FIELD_DELIMITER as the field seperator in a line.
public FileDictionary ( TextReader reader ) : Lucene.Net.Search.Spell
reader TextReader
return Lucene.Net.Search.Spell

FileDictionary() public method

Creates a dictionary based on a reader. Using fieldDelimiter to seperate out the fields in a line.
public FileDictionary ( TextReader reader, string fieldDelimiter ) : Lucene.Net.Search.Spell
reader TextReader
fieldDelimiter string
return Lucene.Net.Search.Spell