Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Lookup.LookupResult

    Result of a lookup.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    Lookup.LookupResult
    Implements
    IComparable<Lookup.LookupResult>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Search.Suggest
    Assembly: Lucene.Net.Suggest.dll
    Syntax
    public sealed class Lookup.LookupResult : IComparable<Lookup.LookupResult>

    Constructors

    LookupResult(string, long)

    Create a new result from a key+weight pair.

    Declaration
    public LookupResult(string key, long value)
    Parameters
    Type Name Description
    string key
    long value

    LookupResult(string, long, BytesRef)

    Create a new result from a key+weight+payload triple.

    Declaration
    public LookupResult(string key, long value, BytesRef payload)
    Parameters
    Type Name Description
    string key
    long value
    BytesRef payload

    LookupResult(string, long, BytesRef, IEnumerable<BytesRef>)

    Create a new result from a key+weight+payload+contexts triple.

    Declaration
    public LookupResult(string key, long value, BytesRef payload, IEnumerable<BytesRef> contexts)
    Parameters
    Type Name Description
    string key
    long value
    BytesRef payload
    IEnumerable<BytesRef> contexts

    LookupResult(string, long, ISet<BytesRef>)

    Create a new result from a key+weight+contexts triple.

    Declaration
    public LookupResult(string key, long value, ISet<BytesRef> contexts)
    Parameters
    Type Name Description
    string key
    long value
    ISet<BytesRef> contexts

    LookupResult(string, object, long, BytesRef)

    Create a new result from a key+highlightKey+weight+payload triple.

    Declaration
    public LookupResult(string key, object highlightKey, long value, BytesRef payload)
    Parameters
    Type Name Description
    string key
    object highlightKey
    long value
    BytesRef payload

    LookupResult(string, object, long, BytesRef, IEnumerable<BytesRef>)

    Create a new result from a key+highlightKey+weight+payload+contexts triple.

    Declaration
    public LookupResult(string key, object highlightKey, long value, BytesRef payload, IEnumerable<BytesRef> contexts)
    Parameters
    Type Name Description
    string key
    object highlightKey
    long value
    BytesRef payload
    IEnumerable<BytesRef> contexts

    Properties

    Contexts

    the key's contexts (null if not present)

    Declaration
    public IEnumerable<BytesRef> Contexts { get; }
    Property Value
    Type Description
    IEnumerable<BytesRef>

    HighlightKey

    Expert: custom Object to hold the result of a highlighted suggestion.

    Declaration
    public object HighlightKey { get; }
    Property Value
    Type Description
    object

    Key

    the key's text

    Declaration
    public string Key { get; }
    Property Value
    Type Description
    string

    Payload

    the key's payload (null if not present)

    Declaration
    public BytesRef Payload { get; }
    Property Value
    Type Description
    BytesRef

    Value

    the key's weight

    Declaration
    public long Value { get; }
    Property Value
    Type Description
    long

    Methods

    CompareTo(LookupResult)

    Compare alphabetically.

    Declaration
    public int CompareTo(Lookup.LookupResult o)
    Parameters
    Type Name Description
    Lookup.LookupResult o
    Returns
    Type Description
    int

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    Implements

    IComparable<T>
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.