Method DoLookup
DoLookup(String, Boolean, Int32)
Look up a key and return possible completion for this key.
Declaration
public virtual IList<Lookup.LookupResult> DoLookup(string key, bool onlyMorePopular, int num)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | lookup key. Depending on the implementation this may be a prefix, misspelling, or even infix. |
System.Boolean | onlyMorePopular | return only more popular results |
System.Int32 | num | maximum number of results to return |
Returns
Type | Description |
---|---|
IList<Lookup.LookupResult> | a list of possible completions, with their relative weight (e.g. popularity) |
DoLookup(String, IEnumerable<BytesRef>, Boolean, Int32)
Look up a key and return possible completion for this key.
Declaration
public abstract IList<Lookup.LookupResult> DoLookup(string key, IEnumerable<BytesRef> contexts, bool onlyMorePopular, int num)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | lookup key. Depending on the implementation this may be a prefix, misspelling, or even infix. |
IEnumerable<BytesRef> | contexts | contexts to filter the lookup by, or null if all contexts are allowed; if the suggestion contains any of the contexts, it's a match |
System.Boolean | onlyMorePopular | return only more popular results |
System.Int32 | num | maximum number of results to return |
Returns
Type | Description |
---|---|
IList<Lookup.LookupResult> | a list of possible completions, with their relative weight (e.g. popularity) |