Class WFSTCompletionLookup
Suggester based on a weighted FST: it first traverses the prefix, then walks the n shortest paths to retrieve top-ranked suggestions.
NOTE: Input weights must be between 0 and System.Int32.MaxValue, any other values will be rejected.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Search.Suggest.Fst
Assembly: Lucene.Net.Suggest.dll
Syntax
public class WFSTCompletionLookup : Lookup
Constructors
| Improve this Doc View SourceWFSTCompletionLookup()
Declaration
public WFSTCompletionLookup()
WFSTCompletionLookup(Boolean)
Creates a new suggester.
Declaration
public WFSTCompletionLookup(bool exactFirst)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | exactFirst | if suggestions that match the
|
Properties
| Improve this Doc View SourceCount
Declaration
public override long Count { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Overrides
Methods
| Improve this Doc View SourceBuild(IInputEnumerator)
Declaration
public override void Build(IInputEnumerator enumerator)
Parameters
Type | Name | Description |
---|---|---|
IInputEnumerator | enumerator |
Overrides
| Improve this Doc View SourceDoLookup(String, IEnumerable<BytesRef>, Boolean, Int32)
Declaration
public override IList<Lookup.LookupResult> DoLookup(string key, IEnumerable<BytesRef> contexts, bool onlyMorePopular, int num)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Collections.Generic.IEnumerable<Lucene.Net.Util.BytesRef> | contexts | |
System.Boolean | onlyMorePopular | |
System.Int32 | num |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<Lookup.LookupResult> |
Overrides
| Improve this Doc View SourceGet(String)
Returns the weight associated with an input string, or null if it does not exist.
Declaration
public virtual long? Get(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.Nullable<System.Int64> |
GetSizeInBytes()
Returns byte size of the underlying FST.
Declaration
public override long GetSizeInBytes()
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
| Improve this Doc View SourceLoad(DataInput)
Declaration
public override bool Load(DataInput input)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Store.DataInput | input |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceStore(DataOutput)
Declaration
public override bool Store(DataOutput output)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Store.DataOutput | output |
Returns
Type | Description |
---|---|
System.Boolean |