Search Results for

    Show / Hide Table of Contents

    Class ExplainDescriptor<TDocument>

    Descriptor for Explain

    https://opensearch.org/docs/latest/api-reference/explain/

    Inheritance
    object
    RequestBase<ExplainRequestParameters>
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>
    ExplainDescriptor<TDocument>
    Implements
    IDescriptor
    IExplainRequest<TDocument>
    IExplainRequest
    IRequest<ExplainRequestParameters>
    IRequest
    Inherited Members
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.Self
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.Assign<TValue>(TValue, Action<IExplainRequest<TDocument>, TValue>)
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.Qs(string, object)
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.RequestConfiguration(Func<RequestConfigurationDescriptor, IRequestConfiguration>)
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.ErrorTrace(bool?)
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.FilterPath(params string[])
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.FilterPath(IEnumerable<string>)
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.Human(bool?)
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.Pretty(bool?)
    RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>.SourceQueryString(string)
    RequestBase<ExplainRequestParameters>.RequestState
    RequestBase<ExplainRequestParameters>.ContentType
    RequestBase<ExplainRequestParameters>.ResolveUrl(RouteValues, IConnectionSettingsValues)
    RequestBase<ExplainRequestParameters>.RequestDefaults(ExplainRequestParameters)
    RequestBase<ExplainRequestParameters>.Q<TOut>(string)
    RequestBase<ExplainRequestParameters>.Q(string, object)
    RequestBase<ExplainRequestParameters>.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 ExplainDescriptor<TDocument> : RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>, IDescriptor, IExplainRequest<TDocument>, IExplainRequest, IRequest<ExplainRequestParameters>, IRequest where TDocument : class
    Type Parameters
    Name Description
    TDocument

    Constructors

    | Edit this page View Source

    ExplainDescriptor()

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

    Declaration
    protected ExplainDescriptor()
    | Edit this page View Source

    ExplainDescriptor(Id)

    /{index}/_explain/{id}

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

    this parameter is required

    | Edit this page View Source

    ExplainDescriptor(IndexName, Id)

    /{index}/_explain/{id}

    Declaration
    public ExplainDescriptor(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

    ExplainDescriptor(TDocument, IndexName, Id)

    /{index}/_explain/{id}

    Declaration
    public ExplainDescriptor(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

    Properties

    | Edit this page View Source

    HttpMethod

    Declaration
    protected override HttpMethod HttpMethod { get; }
    Property Value
    Type Description
    HttpMethod
    Overrides
    RequestBase<ExplainRequestParameters>.HttpMethod

    Methods

    | Edit this page View Source

    AnalyzeWildcard(bool?)

    If true, wildcard and prefix queries are analyzed.

    Declaration
    public ExplainDescriptor<TDocument> AnalyzeWildcard(bool? analyzewildcard = true)
    Parameters
    Type Name Description
    bool? analyzewildcard
    Returns
    Type Description
    ExplainDescriptor<TDocument>
    | Edit this page View Source

    Analyzer(string)

    Analyzer to use for the query string. This parameter can only be used when the q query string parameter is specified.

    Declaration
    public ExplainDescriptor<TDocument> Analyzer(string analyzer)
    Parameters
    Type Name Description
    string analyzer
    Returns
    Type Description
    ExplainDescriptor<TDocument>
    | Edit this page View Source

    DefaultOperator(DefaultOperator?)

    The default operator for query string query: AND or OR.

    Declaration
    public ExplainDescriptor<TDocument> DefaultOperator(DefaultOperator? defaultoperator)
    Parameters
    Type Name Description
    DefaultOperator? defaultoperator
    Returns
    Type Description
    ExplainDescriptor<TDocument>
    | Edit this page View Source

    Df(string)

    Field to use as default where no field prefix is given in the query string.

    Declaration
    public ExplainDescriptor<TDocument> Df(string df)
    Parameters
    Type Name Description
    string df
    Returns
    Type Description
    ExplainDescriptor<TDocument>
    | Edit this page View Source

    Index(IndexName)

    Index names used to limit the request. Only a single index name can be provided to this parameter.

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

    Index<TOther>()

    a shortcut into calling Index(typeof(TOther))

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

    Lenient(bool?)

    If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.

    Declaration
    public ExplainDescriptor<TDocument> Lenient(bool? lenient = true)
    Parameters
    Type Name Description
    bool? lenient
    Returns
    Type Description
    ExplainDescriptor<TDocument>
    | Edit this page View Source

    Preference(string)

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

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

    Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer>)

    Declaration
    public ExplainDescriptor<TDocument> Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer> querySelector)
    Parameters
    Type Name Description
    Func<QueryContainerDescriptor<TDocument>, QueryContainer> querySelector
    Returns
    Type Description
    ExplainDescriptor<TDocument>
    | Edit this page View Source

    QueryOnQueryString(string)

    Query in the Lucene query string syntax.

    Declaration
    public ExplainDescriptor<TDocument> QueryOnQueryString(string queryonquerystring)
    Parameters
    Type Name Description
    string queryonquerystring
    Returns
    Type Description
    ExplainDescriptor<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 ExplainDescriptor<TDocument> Routing(Routing routing)
    Parameters
    Type Name Description
    Routing routing
    Returns
    Type Description
    ExplainDescriptor<TDocument>
    | Edit this page View Source

    SourceEnabled(bool?)

    Whether the _source should be included in the response.

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

    SourceExcludes(Fields)

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

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

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

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

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

    SourceIncludes(Fields)

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

    Declaration
    public ExplainDescriptor<TDocument> SourceIncludes(Fields sourceincludes)
    Parameters
    Type Name Description
    Fields sourceincludes
    Returns
    Type Description
    ExplainDescriptor<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 ExplainDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields)
    Parameters
    Type Name Description
    Expression<Func<TDocument, object>>[] fields
    Returns
    Type Description
    ExplainDescriptor<TDocument>
    | Edit this page View Source

    StoredFields(Fields)

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

    StoredFields(Func<FieldsDescriptor<TDocument>, IPromise<Fields>>)

    Allows to selectively load specific fields for each document represented by a search hit. Defaults to load the internal _source field.

    Declaration
    public ExplainDescriptor<TDocument> StoredFields(Func<FieldsDescriptor<TDocument>, IPromise<Fields>> fields)
    Parameters
    Type Name Description
    Func<FieldsDescriptor<TDocument>, IPromise<Fields>> fields
    Returns
    Type Description
    ExplainDescriptor<TDocument>

    Implements

    IDescriptor
    IExplainRequest<TDocument>
    IExplainRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • ExplainDescriptor()
      • ExplainDescriptor(Id)
      • ExplainDescriptor(IndexName, Id)
      • ExplainDescriptor(TDocument, IndexName, Id)
    • Properties
      • HttpMethod
    • Methods
      • AnalyzeWildcard(bool?)
      • Analyzer(string)
      • DefaultOperator(DefaultOperator?)
      • Df(string)
      • Index(IndexName)
      • Index<TOther>()
      • Lenient(bool?)
      • Preference(string)
      • Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer>)
      • QueryOnQueryString(string)
      • Routing(Routing)
      • SourceEnabled(bool?)
      • SourceExcludes(Fields)
      • SourceExcludes(params Expression<Func<TDocument, object>>[])
      • SourceIncludes(Fields)
      • SourceIncludes(params Expression<Func<TDocument, object>>[])
      • StoredFields(Fields)
      • StoredFields(Func<FieldsDescriptor<TDocument>, IPromise<Fields>>)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX