Search Results for

    Show / Hide Table of Contents

    Class GetRequest

    Request for Get

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

    Inheritance
    object
    RequestBase<GetRequestParameters>
    PlainRequestBase<GetRequestParameters>
    GetRequest
    GetRequest<TDocument>
    Implements
    IGetRequest
    IRequest<GetRequestParameters>
    IRequest
    Inherited Members
    PlainRequestBase<GetRequestParameters>.RequestConfiguration
    PlainRequestBase<GetRequestParameters>.ErrorTrace
    PlainRequestBase<GetRequestParameters>.FilterPath
    PlainRequestBase<GetRequestParameters>.Human
    PlainRequestBase<GetRequestParameters>.Pretty
    PlainRequestBase<GetRequestParameters>.SourceQueryString
    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 GetRequest : PlainRequestBase<GetRequestParameters>, IGetRequest, IRequest<GetRequestParameters>, IRequest

    Constructors

    | Edit this page View Source

    GetRequest()

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

    Declaration
    protected GetRequest()
    | Edit this page View Source

    GetRequest(IndexName, Id)

    /{index}/_doc/{id}

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

    this parameter is required

    Id id

    this parameter is required

    Properties

    | Edit this page View Source

    Preference

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

    Declaration
    public string Preference { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Realtime

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

    Declaration
    public bool? Realtime { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    Refresh

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

    Declaration
    public Refresh? Refresh { get; set; }
    Property Value
    Type Description
    Refresh?
    | Edit this page View Source

    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 Routing Routing { get; set; }
    Property Value
    Type Description
    Routing
    | Edit this page View Source

    Self

    Declaration
    protected IGetRequest Self { get; }
    Property Value
    Type Description
    IGetRequest
    | Edit this page View Source

    SourceEnabled

    Whether the _source should be included in the response.

    Declaration
    public bool? SourceEnabled { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    SourceExcludes

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

    Declaration
    public Fields SourceExcludes { get; set; }
    Property Value
    Type Description
    Fields
    | Edit this page View Source

    SourceIncludes

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

    Declaration
    public Fields SourceIncludes { get; set; }
    Property Value
    Type Description
    Fields
    | Edit this page View Source

    StoredFields

    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 Fields StoredFields { get; set; }
    Property Value
    Type Description
    Fields
    | Edit this page View Source

    Version

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

    Declaration
    public long? Version { get; set; }
    Property Value
    Type Description
    long?
    | Edit this page View Source

    VersionType

    Specific version type: internal, external, external_gte.

    Declaration
    public VersionType? VersionType { get; set; }
    Property Value
    Type Description
    VersionType?

    Implements

    IGetRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • GetRequest()
      • GetRequest(IndexName, Id)
    • Properties
      • Preference
      • Realtime
      • Refresh
      • Routing
      • Self
      • SourceEnabled
      • SourceExcludes
      • SourceIncludes
      • StoredFields
      • Version
      • VersionType
    • Implements
    • Extension Methods
    Back to top Generated by DocFX