docs.unity.cn
    Show / Hide Table of Contents

    Struct SearchDocument

    Represents a searchable document that has been indexed.

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

    Constructors

    SearchDocument(Int32, String, String, Int32)

    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
    Int32 index
    String id
    String path
    Int32 score

    SearchDocument(String, String, String, Int32)

    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
    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

    score

    Declaration
    public readonly int score
    Field Value
    Type Description
    Int32

    Properties

    index

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

    name

    Declaration
    public readonly 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 readonly string path { get; }
    Property Value
    Type Description
    String

    source

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

    valid

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

    Methods

    CompareTo(SearchDocument)

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

    Equals(Object)

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

    Equals(SearchDocument)

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

    GetHashCode()

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

    ToString()

    Returns the document id string.

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    String

    Returns a string representation of the Document.

    Overrides
    ValueType.ToString()
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, October 26, 2022
    Terms of use