Search Results for

    Show / Hide Table of Contents

    Class SearchRequestParameters

    Request options for Search

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

    Inheritance
    object
    RequestParameters<SearchRequestParameters>
    SearchRequestParameters
    Implements
    IRequestParameters
    Inherited Members
    RequestParameters<SearchRequestParameters>.CustomResponseBuilder
    RequestParameters<SearchRequestParameters>.QueryString
    RequestParameters<SearchRequestParameters>.RequestConfiguration
    RequestParameters<SearchRequestParameters>.ContainsQueryString(string)
    RequestParameters<SearchRequestParameters>.GetQueryStringValue<TOut>(string)
    RequestParameters<SearchRequestParameters>.GetResolvedQueryStringValue(string, IConnectionConfigurationValues)
    RequestParameters<SearchRequestParameters>.SetQueryString(string, object)
    RequestParameters<SearchRequestParameters>.Q<TOut>(string)
    RequestParameters<SearchRequestParameters>.Q(string, object)
    RequestParameters<SearchRequestParameters>.SetAcceptHeader(string)
    RequestParameters<SearchRequestParameters>.AcceptHeaderFromFormat(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Net
    Assembly: OpenSearch.Net.dll
    Syntax
    public class SearchRequestParameters : RequestParameters<SearchRequestParameters>, IRequestParameters

    Properties

    | Edit this page View Source

    AllowNoIndices

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

    AllowPartialSearchResults

    If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results.

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

    AnalyzeWildcard

    If true, wildcard and prefix queries are analyzed. This parameter can only be used when the q query string parameter is specified.

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

    Analyzer

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

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

    BatchedReduceSize

    The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.

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

    CancelAfterTimeInterval

    The time after which the search request will be canceled. Request-level parameter takes precedence over cancel_after_time_interval cluster setting.

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

    CcsMinimizeRoundtrips

    If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests.

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

    DefaultHttpMethod

    Declaration
    public override HttpMethod DefaultHttpMethod { get; }
    Property Value
    Type Description
    HttpMethod
    Overrides
    RequestParameters<SearchRequestParameters>.DefaultHttpMethod
    | Edit this page View Source

    DefaultOperator

    The default operator for query string query: AND or OR. This parameter can only be used when the q query string parameter is specified.

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

    Df

    Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified.

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

    DocValueFields

    A comma-separated list of fields to return as the docvalue representation for each hit.

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

    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.

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

    IgnoreThrottled

    If true, concrete, expanded or aliased indexes will be ignored when frozen.

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

    IgnoreUnavailable

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

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

    IncludeNamedQueriesScore

    Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false).

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

    Lenient

    If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can only be used when the q query string parameter is specified.

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

    MaxConcurrentShardRequests

    Defines the number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.

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

    PhaseTook

    Indicates whether to return phase-level took time values in the response.

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

    PreFilterShardSize

    Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). When unspecified, the pre-filter phase is executed if any of these conditions is met: the request targets more than 128 shards; the request targets one or more read-only index; the primary sort of the query targets an indexed field.

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

    Preference

    Nodes and shards used for the search. By default, OpenSearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: _only_local to run the search only on shards on the local node; _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; _shards:<shard>,<shard> to run the search only on the specified shards; <custom-string> (any string that does not start with _) to route searches with the same <custom-string> to the same shards in the same order.

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

    QueryOnQueryString

    Query in the Lucene query string syntax using query parameter search. Query parameter searches do not support the full OpenSearch Query DSL but are handy for testing.

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

    RequestCache

    If true, the caching of search results is enabled for requests where size is 0. Defaults to index level settings.

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

    Routing

    Custom value used to route operations to a specific shard.

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

    Scroll

    Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed 1d (24 hours). You can change this limit using the search.max_keep_alive cluster-level setting.

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

    SearchPipeline

    Customizable sequence of processing stages applied to search queries.

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

    SearchType

    How distributed term frequencies are calculated for relevance scoring.

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

    SequenceNumberPrimaryTerm

    If true, returns sequence number and primary term of the last modification of each hit.

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

    Stats

    Specific tag of the request for logging and statistical purposes.

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

    StoredFields

    A comma-separated 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. You can pass _source: true to return both source fields and stored fields in the search response.

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

    SuggestField

    Specifies which field to use for suggestions.

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

    SuggestMode

    Specifies the suggest mode. This parameter can only be used when the suggest_field and suggest_text query string parameters are specified.

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

    SuggestSize

    Number of suggestions to return. This parameter can only be used when the suggest_field and suggest_text query string parameters are specified.

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

    SuggestText

    The source text for which the suggestions should be returned. This parameter can only be used when the suggest_field and suggest_text query string parameters are specified.

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

    SupportsBody

    Declaration
    public override bool SupportsBody { get; }
    Property Value
    Type Description
    bool
    Overrides
    RequestParameters<SearchRequestParameters>.SupportsBody
    | Edit this page View Source

    TotalHitsAsInteger

    Indicates whether hits.total should be rendered as an integer or an object in the rest search response.

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

    TypedKeys

    If true, aggregation and suggester names are be prefixed by their respective types in the response.

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

    Implements

    IRequestParameters

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • AllowNoIndices
      • AllowPartialSearchResults
      • AnalyzeWildcard
      • Analyzer
      • BatchedReduceSize
      • CancelAfterTimeInterval
      • CcsMinimizeRoundtrips
      • DefaultHttpMethod
      • DefaultOperator
      • Df
      • DocValueFields
      • ExpandWildcards
      • IgnoreThrottled
      • IgnoreUnavailable
      • IncludeNamedQueriesScore
      • Lenient
      • MaxConcurrentShardRequests
      • PhaseTook
      • PreFilterShardSize
      • Preference
      • QueryOnQueryString
      • RequestCache
      • Routing
      • Scroll
      • SearchPipeline
      • SearchType
      • SequenceNumberPrimaryTerm
      • Stats
      • StoredFields
      • SuggestField
      • SuggestMode
      • SuggestSize
      • SuggestText
      • SupportsBody
      • TotalHitsAsInteger
      • TypedKeys
    • Implements
    • Extension Methods
    Back to top Generated by DocFX