Show / Hide Table of Contents

    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 , any other values will be rejected.

    @lucene.experimental

    Inheritance
    System.Object
    Lookup
    WFSTCompletionLookup
    Inherited Members
    Lookup.CHARSEQUENCE_COMPARER
    Lookup.Build(IDictionary)
    Lookup.Load(Stream)
    Lookup.Store(Stream)
    Lookup.DoLookup(String, Boolean, Int32)
    Namespace: Lucene.Net.Search.Suggest.Fst
    Assembly: Lucene.Net.Suggest.dll
    Syntax
    public class WFSTCompletionLookup : Lookup

    Constructors

    | Improve this Doc View Source

    WFSTCompletionLookup()

    Calls WFSTCompletionLookup(Boolean)

    Declaration
    public WFSTCompletionLookup()
    | Improve this Doc View Source

    WFSTCompletionLookup(Boolean)

    Creates a new suggester.

    Declaration
    public WFSTCompletionLookup(bool exactFirst)
    Parameters
    Type Name Description
    System.Boolean exactFirst
    true
    if suggestions that match the
          prefix exactly should always be returned first, regardless
          of score. This has no performance impact, but could result
          in low-quality suggestions. 
    

    Properties

    | Improve this Doc View Source

    Count

    Declaration
    public override long Count { get; }
    Property Value
    Type Description
    System.Int64
    Overrides
    Lookup.Count

    Methods

    | Improve this Doc View Source

    Build(IInputIterator)

    Declaration
    public override void Build(IInputIterator iterator)
    Parameters
    Type Name Description
    IInputIterator iterator
    Overrides
    Lookup.Build(IInputIterator)
    | Improve this Doc View Source

    DoLookup(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
    IEnumerable<BytesRef> contexts
    System.Boolean onlyMorePopular
    System.Int32 num
    Returns
    Type Description
    IList<Lookup.LookupResult>
    Overrides
    Lookup.DoLookup(String, IEnumerable<BytesRef>, Boolean, Int32)
    | Improve this Doc View Source

    Get(String)

    Returns the weight associated with an input string, or null if it does not exist.

    Declaration
    public virtual object Get(string key)
    Parameters
    Type Name Description
    System.String key
    Returns
    Type Description
    System.Object
    | Improve this Doc View Source

    GetSizeInBytes()

    Returns byte size of the underlying FST.

    Declaration
    public override long GetSizeInBytes()
    Returns
    Type Description
    System.Int64
    Overrides
    Lookup.GetSizeInBytes()
    | Improve this Doc View Source

    Load(DataInput)

    Declaration
    public override bool Load(DataInput input)
    Parameters
    Type Name Description
    DataInput input
    Returns
    Type Description
    System.Boolean
    Overrides
    Lookup.Load(DataInput)
    | Improve this Doc View Source

    Store(DataOutput)

    Declaration
    public override bool Store(DataOutput output)
    Parameters
    Type Name Description
    DataOutput output
    Returns
    Type Description
    System.Boolean
    Overrides
    Lookup.Store(DataOutput)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)