Search Results for

    Show / Hide Table of Contents

    Interface ISearchResponse<TDocument>

    A response to a search request

    Inherited Members
    IResponse.DebugInformation
    IResponse.IsValid
    IResponse.OriginalException
    IResponse.ServerError
    IOpenSearchResponse.ApiCall
    IOpenSearchResponse.TryGetServerErrorReason(out string)
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public interface ISearchResponse<out TDocument> : IResponse, IOpenSearchResponse where TDocument : class
    Type Parameters
    Name Description
    TDocument

    The document type

    Properties

    | Edit this page View Source

    Aggregations

    Gets the collection of aggregations

    Declaration
    AggregateDictionary Aggregations { get; }
    Property Value
    Type Description
    AggregateDictionary
    | Edit this page View Source

    Clusters

    Gets the statistics about the clusters on which the search query was executed.

    Declaration
    ClusterStatistics Clusters { get; }
    Property Value
    Type Description
    ClusterStatistics
    | Edit this page View Source

    Documents

    Gets the documents inside the hits, by deserializing Source into TDocument

    NOTE: if you use StoredFields on the search request, Documents will be empty and you should use Fields instead to get the field values. As an alternative to Fields, try source filtering using Source on the search request to return Documents with partial fields selected

    Declaration
    IReadOnlyCollection<out TDocument> Documents { get; }
    Property Value
    Type Description
    IReadOnlyCollection<TDocument>
    | Edit this page View Source

    Fields

    Gets the field values inside the hits, when the search request uses StoredFields.

    Declaration
    IReadOnlyCollection<FieldValues> Fields { get; }
    Property Value
    Type Description
    IReadOnlyCollection<FieldValues>
    | Edit this page View Source

    Hits

    Gets the collection of hits that matched the query

    Declaration
    IReadOnlyCollection<IHit<out TDocument>> Hits { get; }
    Property Value
    Type Description
    IReadOnlyCollection<IHit<TDocument>>

    The hits.

    | Edit this page View Source

    HitsMetadata

    Gets the meta data about the hits that match the search query criteria.

    Declaration
    IHitsMetadata<out TDocument> HitsMetadata { get; }
    Property Value
    Type Description
    IHitsMetadata<TDocument>
    | Edit this page View Source

    MaxScore

    Gets the maximum score for documents matching the search query criteria

    Declaration
    double MaxScore { get; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    NumberOfReducePhases

    Number of times the server performed an incremental reduce phase

    Declaration
    long NumberOfReducePhases { get; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    Profile

    Gets the results of profiling the search query. Has a value only when Profile is set to true on the search request.

    Declaration
    Profile Profile { get; }
    Property Value
    Type Description
    Profile
    | Edit this page View Source

    ScrollId

    Gets the scroll id which can be passed to the Scroll API in order to retrieve the next batch of results. Has a value only when Scroll is specified on the search request

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

    Shards

    Gets the statistics about the shards on which the search query was executed.

    Declaration
    ShardStatistics Shards { get; }
    Property Value
    Type Description
    ShardStatistics
    | Edit this page View Source

    Suggest

    Gets the suggester results.

    Declaration
    ISuggestDictionary<out TDocument> Suggest { get; }
    Property Value
    Type Description
    ISuggestDictionary<TDocument>
    | Edit this page View Source

    TerminatedEarly

    Gets a value indicating whether the search was terminated early

    Declaration
    bool TerminatedEarly { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    TimedOut

    Gets a value indicating whether the search timed out or not

    Declaration
    bool TimedOut { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Took

    Time in milliseconds for OpenSearch to execute the search

    Declaration
    long Took { get; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    Total

    Gets the total number of documents matching the search query criteria

    Declaration
    long Total { get; }
    Property Value
    Type Description
    long

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Aggregations
      • Clusters
      • Documents
      • Fields
      • Hits
      • HitsMetadata
      • MaxScore
      • NumberOfReducePhases
      • Profile
      • ScrollId
      • Shards
      • Suggest
      • TerminatedEarly
      • TimedOut
      • Took
      • Total
    • Extension Methods
    Back to top Generated by DocFX