Class TSTLookup
Suggest implementation based on a Ternary Search Tree
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.Tst
Assembly: Lucene.Net.Suggest.dll
Syntax
public class TSTLookup : Lookup
Constructors
| Improve this Doc View SourceTSTLookup()
Creates a new TSTLookup with an empty Ternary Search Tree.
Declaration
public TSTLookup()
See Also
Properties
| Improve this Doc View SourceCount
Declaration
public override long Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
Overrides
Methods
| Improve this Doc View SourceAdd(String, Object)
Adds a new node if
key already exists,
otherwise replaces its value.
This method always returns true.
Declaration
public virtual bool Add(string key, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | |
| System.Object | value |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Build(IInputIterator)
Declaration
public override void Build(IInputIterator tfit)
Parameters
| Type | Name | Description |
|---|---|---|
| IInputIterator | tfit |
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<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 value for the specified key, or null if the key does not exist.
Declaration
public virtual object Get(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key |
Returns
| Type | Description |
|---|---|
| System.Object |
GetSizeInBytes()
Returns byte size of the underlying TST
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 |
|---|---|---|
| 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 |
|---|---|---|
| DataOutput | output |
Returns
| Type | Description |
|---|---|
| System.Boolean |