docs.unity3d.com
    Show / Hide Table of Contents

    Struct SearchDocument

    Represents a searchable document that has been indexed.

    Namespace: UnityEditor.Search
    Syntax
    public struct SearchDocument : IEquatable<SearchDocument>, IComparable<SearchDocument>

    Constructors

    SearchDocument(Int32, String, String, Int32)

    Create a new SearchDocument

    Declaration
    public SearchDocument(int index, string id, string path = null, int score = 2147483647)
    Parameters
    Type Name Description
    Int32 index
    String id

    Document Id

    String path
    Int32 score

    SearchDocument(SearchDocument, Int32)

    Declaration
    public SearchDocument(SearchDocument doc, int score)
    Parameters
    Type Name Description
    SearchDocument doc
    Int32 score

    SearchDocument(SearchDocument, String)

    Declaration
    public SearchDocument(SearchDocument doc, string path)
    Parameters
    Type Name Description
    SearchDocument doc
    String path

    Fields

    id

    Declaration
    public readonly string id
    Field Value
    Type Description
    String

    index

    Declaration
    public readonly int index
    Field Value
    Type Description
    Int32

    score

    Declaration
    public readonly int score
    Field Value
    Type Description
    Int32

    Properties

    path

    Declaration
    public string path { get; }
    Property Value
    Type Description
    String

    valid

    Declaration
    public bool valid { get; }
    Property Value
    Type Description
    Boolean

    Methods

    CompareTo(SearchDocument)

    Declaration
    public int CompareTo(SearchDocument other)
    Parameters
    Type Name Description
    SearchDocument other
    Returns
    Type Description
    Int32

    Equals(Object)

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    Object other
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(SearchDocument)

    Declaration
    public bool Equals(SearchDocument other)
    Parameters
    Type Name Description
    SearchDocument other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    ToString()

    Returns the document id string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    Returns a string representation of the Document.

    Overrides
    ValueType.ToString()
    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