Struct SearchResult | Quick Search | 2.0.0
docs.unity3d.com
    Show / Hide Table of Contents

    Struct SearchResult

    Encapsulate an element that was retrieved from a query in a g.

    Namespace: Unity.QuickSearch
    Syntax
    public struct SearchResult : IEquatable<SearchResult>, IComparable<SearchResult>

    Constructors

    SearchResult(Int32)

    Create a new SearchResult

    Declaration
    public SearchResult(int index)
    Parameters
    Type Name Description
    Int32 index

    Index of the document containing that result.

    SearchResult(Int32, Int32)

    Create a new SearchResult

    Declaration
    public SearchResult(int index, int score)
    Parameters
    Type Name Description
    Int32 index

    Index of the document containing that result.

    Int32 score

    Score of the result. Higher means it is a more relevant result.

    SearchResult(String, Int32, Int32)

    Create a new SearchResult

    Declaration
    public SearchResult(string id, int index, int score)
    Parameters
    Type Name Description
    String id

    Id of the document containing that result.

    Int32 index

    Index of the document containing that result.

    Int32 score

    Score of the result. Higher means it is a more relevant result.

    Fields

    id

    Id of the document containing that result.

    Declaration
    public readonly string id
    Field Value
    Type Description
    String

    index

    Index of the document containing that result.

    Declaration
    public readonly int index
    Field Value
    Type Description
    Int32

    score

    Score of the result. Higher means it is a more relevant result.

    Declaration
    public readonly int score
    Field Value
    Type Description
    Int32

    Methods

    CompareTo(SearchResult)

    Compare Search Result using their index value.

    Declaration
    public int CompareTo(SearchResult other)
    Parameters
    Type Name Description
    SearchResult other

    Another SearchResult to compare.

    Returns
    Type Description
    Int32

    Returns true if both SearchResult have the same index.

    Equals(Object)

    Compare Search Result using their index value.

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    Object other

    Another SearchResult to compare.

    Returns
    Type Description
    Boolean

    Returns true if both SearchResult have the same index.

    Overrides
    ValueType.Equals(Object)

    Equals(SearchResult)

    Compare Search Result using their index value.

    Declaration
    public bool Equals(SearchResult other)
    Parameters
    Type Name Description
    SearchResult other

    Another SearchResult to compare.

    Returns
    Type Description
    Boolean

    Returns true if both SearchResult have the same index.

    GetHashCode()

    Compute the hash code for this SearchResult from its index property.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023