Class FSTCompletionLookup
An adapter from Lookup API to FSTCompletion.
This adapter differs from FSTCompletion in that it attempts to discretize any "weights" as passed from in Weight to match the number of buckets. For the rationale for bucketing, see FSTCompletion.
Note:Discretization requires an additional sorting pass.
The range of weights for bucketing/ discretization is determined by sorting the input by weight and then dividing into equal ranges. Then, scores within each range are assigned to that bucket.
Note that this means that even large differences in weights may be lost during automaton construction, but the overall distinction between "classes" of weights will be preserved regardless of the distribution of weights.
For fine-grained control over which weights are assigned to which buckets, use FSTCompletion directly or TSTLookup, for example.
Inherited Members
Assembly: Lucene.Net.Suggest.dll
Syntax
public class FSTCompletionLookup : Lookup
Constructors
Name | Description |
---|---|
FSTCompletionLookup() | This constructor prepares for creating a suggested FST using the Build(IInputIterator) method. The number of weight discretization buckets is set to DEFAULT_BUCKETS and exact matches are promoted to the top of the suggestions list. |
FSTCompletionLookup(FSTCompletion, Boolean) | This constructor takes a pre-built automaton. |
FSTCompletionLookup(Int32, Boolean) | This constructor prepares for creating a suggested FST using the Build(IInputIterator) method. |
Properties
Name | Description |
---|---|
Count |
Methods
Name | Description |
---|---|
Build(IInputIterator) | |
DoLookup(String, IEnumerable<BytesRef>, Boolean, Int32) | |
Get(String) | Returns the bucket (weight) as a Long for the provided key if it exists, otherwise null if it does not. |
GetSizeInBytes() | |
Load(DataInput) | |
Store(DataOutput) |