Search Results for

    Show / Hide Table of Contents

    Class GetDescriptor<TDocument>

    Descriptor for Get

    https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/

    Inheritance
    object
    RequestBase<GetRequestParameters>
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>
    GetDescriptor<TDocument>
    Implements
    IDescriptor
    IGetRequest<TDocument>
    IGetRequest
    IRequest<GetRequestParameters>
    IRequest
    Inherited Members
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.Self
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.Assign<TValue>(TValue, Action<IGetRequest<TDocument>, TValue>)
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.Qs(string, object)
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.RequestConfiguration(Func<RequestConfigurationDescriptor, IRequestConfiguration>)
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.ErrorTrace(bool?)
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.FilterPath(params string[])
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.FilterPath(IEnumerable<string>)
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.Human(bool?)
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.Pretty(bool?)
    RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>.SourceQueryString(string)
    RequestBase<GetRequestParameters>.HttpMethod
    RequestBase<GetRequestParameters>.RequestState
    RequestBase<GetRequestParameters>.ContentType
    RequestBase<GetRequestParameters>.ResolveUrl(RouteValues, IConnectionSettingsValues)
    RequestBase<GetRequestParameters>.RequestDefaults(GetRequestParameters)
    RequestBase<GetRequestParameters>.Q<TOut>(string)
    RequestBase<GetRequestParameters>.Q(string, object)
    RequestBase<GetRequestParameters>.SetAcceptHeader(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public class GetDescriptor<TDocument> : RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>, IDescriptor, IGetRequest<TDocument>, IGetRequest, IRequest<GetRequestParameters>, IRequest where TDocument : class
    Type Parameters
    Name Description
    TDocument

    Constructors

    | Edit this page View Source

    GetDescriptor()

    Used for serialization purposes, making sure we have a parameterless constructor

    Declaration
    protected GetDescriptor()
    | Edit this page View Source

    GetDescriptor(Id)

    /{index}/_doc/{id}

    Declaration
    public GetDescriptor(Id id)
    Parameters
    Type Name Description
    Id id

    this parameter is required

    | Edit this page View Source

    GetDescriptor(IndexName, Id)

    /{index}/_doc/{id}

    Declaration
    public GetDescriptor(IndexName index, Id id)
    Parameters
    Type Name Description
    IndexName index

    this parameter is required

    Id id

    this parameter is required

    | Edit this page View Source

    GetDescriptor(TDocument, IndexName, Id)

    /{index}/_doc/{id}

    Declaration
    public GetDescriptor(TDocument documentWithId, IndexName index = null, Id id = null)
    Parameters
    Type Name Description
    TDocument documentWithId
    IndexName index
    Id id

    The document used to resolve the path from

    Methods

    | Edit this page View Source

    ExecuteOnLocalShard()

    Declaration
    public GetDescriptor<TDocument> ExecuteOnLocalShard()
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    Index(IndexName)

    Name of the index that contains the document.

    Declaration
    public GetDescriptor<TDocument> Index(IndexName index)
    Parameters
    Type Name Description
    IndexName index
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    Index<TOther>()

    a shortcut into calling Index(typeof(TOther))

    Declaration
    public GetDescriptor<TDocument> Index<TOther>() where TOther : class
    Returns
    Type Description
    GetDescriptor<TDocument>
    Type Parameters
    Name Description
    TOther
    | Edit this page View Source

    Preference(string)

    Specifies the node or shard the operation should be performed on. Random by default.

    Declaration
    public GetDescriptor<TDocument> Preference(string preference)
    Parameters
    Type Name Description
    string preference
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    Realtime(bool?)

    If true, the request is real-time as opposed to near-real-time.

    Declaration
    public GetDescriptor<TDocument> Realtime(bool? realtime = true)
    Parameters
    Type Name Description
    bool? realtime
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    Refresh(Refresh?)

    If true, OpenSearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.

    Declaration
    public GetDescriptor<TDocument> Refresh(Refresh? refresh)
    Parameters
    Type Name Description
    Refresh? refresh
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    Routing(Routing)

    A document is routed to a particular shard in an index using the following formula

    shard_num = hash(_routing) % num_primary_shards

    OpenSearch will use the document id if not provided.

    For requests that are constructed from/for a document OpenSearch.Client will automatically infer the routing key if that document has a JoinField or a routing mapping on for its type exists on ConnectionSettings

    Declaration
    public GetDescriptor<TDocument> Routing(Routing routing)
    Parameters
    Type Name Description
    Routing routing
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    SourceEnabled(bool?)

    Whether the _source should be included in the response.

    Declaration
    public GetDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true)
    Parameters
    Type Name Description
    bool? sourceenabled
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    SourceExcludes(Fields)

    A comma-separated list of source fields to exclude in the response.

    Declaration
    public GetDescriptor<TDocument> SourceExcludes(Fields sourceexcludes)
    Parameters
    Type Name Description
    Fields sourceexcludes
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    SourceExcludes(params Expression<Func<TDocument, object>>[])

    A comma-separated list of source fields to exclude in the response.

    Declaration
    public GetDescriptor<TDocument> SourceExcludes(params Expression<Func<TDocument, object>>[] fields)
    Parameters
    Type Name Description
    Expression<Func<TDocument, object>>[] fields
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    SourceIncludes(Fields)

    A comma-separated list of source fields to include in the response.

    Declaration
    public GetDescriptor<TDocument> SourceIncludes(Fields sourceincludes)
    Parameters
    Type Name Description
    Fields sourceincludes
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    SourceIncludes(params Expression<Func<TDocument, object>>[])

    A comma-separated list of source fields to include in the response.

    Declaration
    public GetDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields)
    Parameters
    Type Name Description
    Expression<Func<TDocument, object>>[] fields
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    StoredFields(Fields)

    List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the _source parameter defaults to false.

    Declaration
    public GetDescriptor<TDocument> StoredFields(Fields storedfields)
    Parameters
    Type Name Description
    Fields storedfields
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    StoredFields(params Expression<Func<TDocument, object>>[])

    List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the _source parameter defaults to false.

    Declaration
    public GetDescriptor<TDocument> StoredFields(params Expression<Func<TDocument, object>>[] fields)
    Parameters
    Type Name Description
    Expression<Func<TDocument, object>>[] fields
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    Version(long?)

    Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.

    Declaration
    public GetDescriptor<TDocument> Version(long? version)
    Parameters
    Type Name Description
    long? version
    Returns
    Type Description
    GetDescriptor<TDocument>
    | Edit this page View Source

    VersionType(VersionType?)

    Specific version type: internal, external, external_gte.

    Declaration
    public GetDescriptor<TDocument> VersionType(VersionType? versiontype)
    Parameters
    Type Name Description
    VersionType? versiontype
    Returns
    Type Description
    GetDescriptor<TDocument>

    Implements

    IDescriptor
    IGetRequest<TDocument>
    IGetRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • GetDescriptor()
      • GetDescriptor(Id)
      • GetDescriptor(IndexName, Id)
      • GetDescriptor(TDocument, IndexName, Id)
    • Methods
      • ExecuteOnLocalShard()
      • Index(IndexName)
      • Index<TOther>()
      • Preference(string)
      • Realtime(bool?)
      • Refresh(Refresh?)
      • Routing(Routing)
      • SourceEnabled(bool?)
      • SourceExcludes(Fields)
      • SourceExcludes(params Expression<Func<TDocument, object>>[])
      • SourceIncludes(Fields)
      • SourceIncludes(params Expression<Func<TDocument, object>>[])
      • StoredFields(Fields)
      • StoredFields(params Expression<Func<TDocument, object>>[])
      • Version(long?)
      • VersionType(VersionType?)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX