Namespace Lucene.Net.Search.Suggest
Classes
BufferedInputIterator
This wrapper buffers incoming elements. @lucene.experimental
BufferingTermFreqIteratorWrapper
This wrapper buffers incoming elements. @lucene.experimental
DocumentDictionary
Dictionary with terms, weights, payload (optional) and contexts (optional) information taken from stored/indexed fields in a Lucene index.
NOTE:- The term and (optionally) payload fields have to be stored
-
The weight field can be stored or can be a
. If the weight field is not defined, the value of the weight is 0
- if any of the term or (optionally) payload fields supplied do not have a value for a document, then the document is skipped by the dictionary
DocumentDictionary.DocumentInputIterator
Implements IInputIterator from stored fields.
DocumentValueSourceDictionary
Dictionary with terms and optionally payload information taken from stored fields in a Lucene index. Similar to DocumentDictionary, except it obtains the weight of the terms in a document based on a ValueSource.
NOTE:- The term and (optionally) payload fields have to be stored
- if the term or (optionally) payload fields supplied do not have a value for a document, then the document is rejected by the dictionary
In practice the ValueSource will likely be obtained using the lucene expression module. The following example shows how to create a ValueSource from a simple addition of two fields:
Expression expression = JavascriptCompiler.Compile("f1 + f2");
SimpleBindings bindings = new SimpleBindings();
bindings.Add(new SortField("f1", SortField.Type_e.LONG));
bindings.Add(new SortField("f2", SortField.Type_e.LONG));
ValueSource valueSource = expression.GetValueSource(bindings);
EmptyInputIterator
Singleton IInputIterator that iterates over 0 BytesRefs.
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
InMemorySorter
An IBytesRefSorter that keeps all the entries in memory. @lucene.experimental @lucene.internal
InputIteratorWrapper
Wraps a 1
and carries no payload
Lookup
Simple Lookup interface for
Lookup.LookupPriorityQueue
A
Lookup.LookupResult
Result of a lookup. @lucene.experimental
SortedInputIterator
This wrapper buffers incoming elements and makes sure they are sorted based on given comparer. @lucene.experimental
SortedTermFreqIteratorWrapper
This wrapper buffers incoming elements and makes sure they are sorted based on given comparer. @lucene.experimental
UnsortedInputIterator
This wrapper buffers the incoming elements and makes sure they are in random order. @lucene.experimental
Interfaces
IInputIterator
Interface for enumerating term,weight,payload triples for suggester consumption; currently only AnalyzingSuggester, FuzzySuggester and AnalyzingInfixSuggester support payloads.