docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SearchDocument

    Represents a searchable document that has been indexed.

    Implements
    IEquatable<SearchDocument>
    IComparable<SearchDocument>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.Search
    Assembly: com.unity.quicksearch.dll
    Syntax
    public readonly struct SearchDocument : IEquatable<SearchDocument>, IComparable<SearchDocument>

    Constructors

    SearchDocument(int, string, string, int)

    Declaration
    [Obsolete("Search document index is no longer used and will be removed.", true)]
    public SearchDocument(int index, string id, string path = null, int score = 2147483647)
    Parameters
    Type Name Description
    int index
    string id
    string path
    int score

    SearchDocument(string, string, string, int)

    Create a new SearchDocument

    Declaration
    public SearchDocument(string id, string name = null, string source = null, int score = 2147483647)
    Parameters
    Type Name Description
    string id

    Document Id

    string name
    string source
    int score

    SearchDocument(SearchDocument, int)

    Declaration
    public SearchDocument(SearchDocument doc, int score)
    Parameters
    Type Name Description
    SearchDocument doc
    int 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

    score

    Declaration
    public readonly int score
    Field Value
    Type Description
    int

    Properties

    index

    Declaration
    [Obsolete("Search document index is no longer used and will be removed.", true)]
    public int index { get; }
    Property Value
    Type Description
    int

    name

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

    path

    Declaration
    [Obsolete("Use name to get the document name and source to get the document source path.", true)]
    public string path { get; }
    Property Value
    Type Description
    string

    source

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

    valid

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

    Methods

    CompareTo(SearchDocument)

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

    Equals(object)

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

    Equals(SearchDocument)

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

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    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()

    Implements

    IEquatable<T>
    IComparable<T>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)