Search Results for

    Show / Hide Table of Contents

    Class SearchTemplateDescriptor<TDocument>

    Descriptor for SearchTemplate

    https://opensearch.org/docs/latest/search-plugins/search-template/

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

    Constructors

    | Edit this page View Source

    SearchTemplateDescriptor()

    /{index}/_search/template

    Declaration
    public SearchTemplateDescriptor()
    | Edit this page View Source

    SearchTemplateDescriptor(Indices)

    /{index}/_search/template

    Declaration
    public SearchTemplateDescriptor(Indices index)
    Parameters
    Type Name Description
    Indices index

    Optional, accepts null

    Methods

    | Edit this page View Source

    AllIndices()

    A shortcut into calling Index(Indices.All)

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

    AllowNoIndices(bool?)

    If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.

    Declaration
    public SearchTemplateDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true)
    Parameters
    Type Name Description
    bool? allownoindices
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    CcsMinimizeRoundtrips(bool?)

    If true, network round-trips are minimized for cross-cluster search requests.

    Declaration
    public SearchTemplateDescriptor<TDocument> CcsMinimizeRoundtrips(bool? ccsminimizeroundtrips = true)
    Parameters
    Type Name Description
    bool? ccsminimizeroundtrips
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    ExpandWildcards(ExpandWildcards?)

    Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.

    Declaration
    public SearchTemplateDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards)
    Parameters
    Type Name Description
    ExpandWildcards? expandwildcards
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    Explain(bool?)

    If true, the response includes additional details about score computation as part of a hit.

    Declaration
    public SearchTemplateDescriptor<TDocument> Explain(bool? explain = true)
    Parameters
    Type Name Description
    bool? explain
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    Id(string)

    Declaration
    public SearchTemplateDescriptor<TDocument> Id(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    IgnoreThrottled(bool?)

    If true, specified concrete, expanded, or aliased indexes are not included in the response when throttled.

    Declaration
    public SearchTemplateDescriptor<TDocument> IgnoreThrottled(bool? ignorethrottled = true)
    Parameters
    Type Name Description
    bool? ignorethrottled
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    IgnoreUnavailable(bool?)

    If false, the request returns an error if it targets a missing or closed index.

    Declaration
    public SearchTemplateDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true)
    Parameters
    Type Name Description
    bool? ignoreunavailable
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    Index(Indices)

    Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*).

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

    Index<TOther>()

    a shortcut into calling Index(typeof(TOther))

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

    Params(Dictionary<string, object>)

    Declaration
    public SearchTemplateDescriptor<TDocument> Params(Dictionary<string, object> paramDictionary)
    Parameters
    Type Name Description
    Dictionary<string, object> paramDictionary
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    Params(Func<FluentDictionary<string, object>, FluentDictionary<string, object>>)

    Declaration
    public SearchTemplateDescriptor<TDocument> Params(Func<FluentDictionary<string, object>, FluentDictionary<string, object>> paramDictionary)
    Parameters
    Type Name Description
    Func<FluentDictionary<string, object>, FluentDictionary<string, object>> paramDictionary
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    Preference(string)

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

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

    Profile(bool?)

    If true, the query execution is profiled.

    Declaration
    public SearchTemplateDescriptor<TDocument> Profile(bool? profile = true)
    Parameters
    Type Name Description
    bool? profile
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    RequestDefaults(SearchTemplateRequestParameters)

    Allows a request implementation to set certain request parameter defaults, use sparingly!

    Declaration
    protected override sealed void RequestDefaults(SearchTemplateRequestParameters parameters)
    Parameters
    Type Name Description
    SearchTemplateRequestParameters parameters
    Overrides
    RequestBase<SearchTemplateRequestParameters>.RequestDefaults(SearchTemplateRequestParameters)
    | 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 SearchTemplateDescriptor<TDocument> Routing(Routing routing)
    Parameters
    Type Name Description
    Routing routing
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    Scroll(Time)

    Specifies how long a consistent view of the index should be maintained for scrolled search.

    Declaration
    public SearchTemplateDescriptor<TDocument> Scroll(Time scroll)
    Parameters
    Type Name Description
    Time scroll
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    SearchType(SearchType?)

    The type of the search operation.

    Declaration
    public SearchTemplateDescriptor<TDocument> SearchType(SearchType? searchtype)
    Parameters
    Type Name Description
    SearchType? searchtype
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    Source(string)

    Declaration
    public SearchTemplateDescriptor<TDocument> Source(string template)
    Parameters
    Type Name Description
    string template
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    TotalHitsAsInteger(bool?)

    If true, hits.total are rendered as an integer in the response.

    Declaration
    public SearchTemplateDescriptor<TDocument> TotalHitsAsInteger(bool? totalhitsasinteger = true)
    Parameters
    Type Name Description
    bool? totalhitsasinteger
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>
    | Edit this page View Source

    TypedKeys(bool?)

    If true, the response prefixes aggregation and suggester names with their respective types.

    Declaration
    public SearchTemplateDescriptor<TDocument> TypedKeys(bool? typedkeys = true)
    Parameters
    Type Name Description
    bool? typedkeys
    Returns
    Type Description
    SearchTemplateDescriptor<TDocument>

    Implements

    IDescriptor
    ISearchTemplateRequest
    ITypedSearchRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • SearchTemplateDescriptor()
      • SearchTemplateDescriptor(Indices)
    • Methods
      • AllIndices()
      • AllowNoIndices(bool?)
      • CcsMinimizeRoundtrips(bool?)
      • ExpandWildcards(ExpandWildcards?)
      • Explain(bool?)
      • Id(string)
      • IgnoreThrottled(bool?)
      • IgnoreUnavailable(bool?)
      • Index(Indices)
      • Index<TOther>()
      • Params(Dictionary<string, object>)
      • Params(Func<FluentDictionary<string, object>, FluentDictionary<string, object>>)
      • Preference(string)
      • Profile(bool?)
      • RequestDefaults(SearchTemplateRequestParameters)
      • Routing(Routing)
      • Scroll(Time)
      • SearchType(SearchType?)
      • Source(string)
      • TotalHitsAsInteger(bool?)
      • TypedKeys(bool?)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX