Search Results for

    Show / Hide Table of Contents

    Interface ISearchRequest

    Inherited Members
    ITypedSearchRequest.ClrType
    IRequest<SearchRequestParameters>.RequestParameters
    IRequest.ContentType
    IRequest.HttpMethod
    IRequest.RouteValues
    IRequest.GetUrl(IConnectionSettingsValues)
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public interface ISearchRequest : ITypedSearchRequest, IRequest<SearchRequestParameters>, IRequest

    Properties

    | Edit this page View Source

    Aggregations

    Specifies the aggregations to perform

    Declaration
    [DataMember(Name = "aggs")]
    AggregationDictionary Aggregations { get; set; }
    Property Value
    Type Description
    AggregationDictionary
    | Edit this page View Source

    Collapse

    Allows to collapse search results based on field values. The collapsing is done by selecting only the top sorted document per collapse key. For instance the query below retrieves the best tweet for each user and sorts them by number of likes.

    NOTE: The collapsing is applied to the top hits only and does not affect aggregations. You can only collapse to a depth of 2.

    Declaration
    [DataMember(Name = "collapse")]
    IFieldCollapse Collapse { get; set; }
    Property Value
    Type Description
    IFieldCollapse
    | Edit this page View Source

    DocValueFields

    Declaration
    [DataMember(Name = "docvalue_fields")]
    Fields DocValueFields { get; set; }
    Property Value
    Type Description
    Fields
    | Edit this page View Source

    Explain

    Enables explanation for each hit on how its score was computed

    Declaration
    [DataMember(Name = "explain")]
    bool? Explain { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    Ext

    Declaration
    [DataMember(Name = "ext")]
    IDictionary<string, object> Ext { get; set; }
    Property Value
    Type Description
    IDictionary<string, object>
    | Edit this page View Source

    Fields

    BETA: Allows for retrieving a list of document fields in the search response.

    This functionality is in beta and is subject to change.

    Declaration
    [DataMember(Name = "fields")]
    Fields Fields { get; set; }
    Property Value
    Type Description
    Fields
    | Edit this page View Source

    From

    The starting from index of the hits to return. Defaults to 0.

    Declaration
    [DataMember(Name = "from")]
    int? From { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    Highlight

    Allow to highlight search results on one or more fields. The implementation uses the either lucene fast-vector-highlighter or highlighter.

    Declaration
    [DataMember(Name = "highlight")]
    IHighlight Highlight { get; set; }
    Property Value
    Type Description
    IHighlight
    | Edit this page View Source

    Index

    Declaration
    [IgnoreDataMember]
    Indices Index { get; }
    Property Value
    Type Description
    Indices
    | Edit this page View Source

    IndicesBoost

    Allows to configure different boost level per index when searching across more than one indices. This is very handy when hits coming from one index matter more than hits coming from another index (think social graph where each user has an index).

    Declaration
    [DataMember(Name = "indices_boost")]
    IDictionary<IndexName, double> IndicesBoost { get; set; }
    Property Value
    Type Description
    IDictionary<IndexName, double>
    | Edit this page View Source

    MinScore

    Allows to filter out documents based on a minimum score

    Declaration
    [DataMember(Name = "min_score")]
    double? MinScore { get; set; }
    Property Value
    Type Description
    double?
    | Edit this page View Source

    PointInTime

    Search against a dataset frozen at a point-in-time (PIT)

    https://opensearch.org/docs/latest/search-plugins/point-in-time/
    Declaration
    [DataMember(Name = "pit")]
    IPointInTime PointInTime { get; set; }
    Property Value
    Type Description
    IPointInTime
    Remarks

    Supported by OpenSearch servers of version 2.4.0 or greater.

    See Also
    CreatePit(Indices, Func<CreatePitDescriptor, ICreatePitRequest>)
    CreatePit(ICreatePitRequest)
    | Edit this page View Source

    PostFilter

    Specify a query to apply to the search hits at the very end of a search request, after aggregations have already been calculated. Useful when both search hits and aggregations will be returned in the response, and a filter should only be applied to the search hits.

    Declaration
    [DataMember(Name = "post_filter")]
    QueryContainer PostFilter { get; set; }
    Property Value
    Type Description
    QueryContainer
    | Edit this page View Source

    Profile

    The Profile API provides detailed timing information about the execution of individual components in a query. It gives the user insight into how queries are executed at a low level so that the user can understand why certain queries are slow, and take steps to improve their slow queries.

    Declaration
    [DataMember(Name = "profile")]
    bool? Profile { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    Query

    Specify the search query to perform

    Declaration
    [DataMember(Name = "query")]
    QueryContainer Query { get; set; }
    Property Value
    Type Description
    QueryContainer
    | Edit this page View Source

    Rescore

    Specify one or more queries to use for rescoring

    Declaration
    [DataMember(Name = "rescore")]
    IList<IRescore> Rescore { get; set; }
    Property Value
    Type Description
    IList<IRescore>
    | Edit this page View Source

    RuntimeFields

    Specifies runtime fields which exist only as part of the query.

    Declaration
    [DataMember(Name = "runtime_mappings")]
    IRuntimeFields RuntimeFields { get; set; }
    Property Value
    Type Description
    IRuntimeFields
    | Edit this page View Source

    ScriptFields

    Allows to return a script evaluation (based on different fields) for each hit

    Declaration
    [DataMember(Name = "script_fields")]
    IScriptFields ScriptFields { get; set; }
    Property Value
    Type Description
    IScriptFields
    | Edit this page View Source

    SearchAfter

    Sort values that can be used to start returning results "after" any document in the result list.

    Declaration
    [DataMember(Name = "search_after")]
    IList<object> SearchAfter { get; set; }
    Property Value
    Type Description
    IList<object>
    | Edit this page View Source

    Size

    The number of hits to return. Defaults to 10.

    Declaration
    [DataMember(Name = "size")]
    int? Size { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    Slice

    For scroll queries that return a lot of documents it is possible to split the scroll in multiple slices which can be consumed independently

    Declaration
    [DataMember(Name = "slice")]
    ISlicedScroll Slice { get; set; }
    Property Value
    Type Description
    ISlicedScroll
    | Edit this page View Source

    Sort

    Specifies how to sort the search hits

    Declaration
    [DataMember(Name = "sort")]
    IList<ISort> Sort { get; set; }
    Property Value
    Type Description
    IList<ISort>
    | Edit this page View Source

    Source

    Specify how the _source field is returned for each search hit.

    When true, _source retrieval is enabled (default)

    When false, _source retrieval is disabled, and no _source will be returned for each hit

    When ISourceFilter is specified, fields to include/exclude can be controlled

    Declaration
    [DataMember(Name = "_source")]
    Union<bool, ISourceFilter> Source { get; set; }
    Property Value
    Type Description
    Union<bool, ISourceFilter>
    | Edit this page View Source

    StoredFields

    Declaration
    [DataMember(Name = "stored_fields")]
    Fields StoredFields { get; set; }
    Property Value
    Type Description
    Fields
    | Edit this page View Source

    Suggest

    The suggest feature suggests similar looking terms based on a provided text by using a suggester

    Declaration
    [DataMember(Name = "suggest")]
    ISuggestContainer Suggest { get; set; }
    Property Value
    Type Description
    ISuggestContainer
    | Edit this page View Source

    TerminateAfter

    The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. If set, the response will have a boolean field terminated_early to indicate whether the query execution has actually terminated_early.

    Declaration
    [DataMember(Name = "terminate_after")]
    long? TerminateAfter { get; set; }
    Property Value
    Type Description
    long?
    | Edit this page View Source

    Timeout

    A search timeout, bounding the search request to be executed within the specified time value and bail with the hits accumulated up to that point, when expired. Defaults to no timeout.

    Declaration
    [DataMember(Name = "timeout")]
    string Timeout { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    TrackScores

    Make sure we keep calculating score even if we are sorting on a field.

    Declaration
    [DataMember(Name = "track_scores")]
    bool? TrackScores { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    TrackTotalHits

    Declaration
    [DataMember(Name = "track_total_hits")]
    TrackTotalHits TrackTotalHits { get; set; }
    Property Value
    Type Description
    TrackTotalHits
    | Edit this page View Source

    Version

    Return a version for each search hit

    Declaration
    [DataMember(Name = "version")]
    bool? Version { get; set; }
    Property Value
    Type Description
    bool?

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Aggregations
      • Collapse
      • DocValueFields
      • Explain
      • Ext
      • Fields
      • From
      • Highlight
      • Index
      • IndicesBoost
      • MinScore
      • PointInTime
      • PostFilter
      • Profile
      • Query
      • Rescore
      • RuntimeFields
      • ScriptFields
      • SearchAfter
      • Size
      • Slice
      • Sort
      • Source
      • StoredFields
      • Suggest
      • TerminateAfter
      • Timeout
      • TrackScores
      • TrackTotalHits
      • Version
    • Extension Methods
    Back to top Generated by DocFX