Interface ISearchResponse<TDocument>
A response to a search request
Inherited Members
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 SourceAggregations
Gets the collection of aggregations
Declaration
AggregateDictionary Aggregations { get; }
Property Value
Type | Description |
---|---|
Aggregate |
Clusters
Gets the statistics about the clusters on which the search query was executed.
Declaration
ClusterStatistics Clusters { get; }
Property Value
Type | Description |
---|---|
Cluster |
Documents
Gets the documents inside the hits, by deserializing Source
into TDocument
NOTE: if you use Stored
Declaration
IReadOnlyCollection<out TDocument> Documents { get; }
Property Value
Type | Description |
---|---|
IRead |
Fields
Gets the field values inside the hits, when the search request uses
Stored
Declaration
IReadOnlyCollection<FieldValues> Fields { get; }
Property Value
Type | Description |
---|---|
IRead |
Hits
Gets the collection of hits that matched the query
Declaration
IReadOnlyCollection<IHit<out TDocument>> Hits { get; }
Property Value
Type | Description |
---|---|
IRead |
The hits. |
HitsMetadata
Gets the meta data about the hits that match the search query criteria.
Declaration
IHitsMetadata<out TDocument> HitsMetadata { get; }
Property Value
Type | Description |
---|---|
IHits |
MaxScore
Gets the maximum score for documents matching the search query criteria
Declaration
double MaxScore { get; }
Property Value
Type | Description |
---|---|
double |
NumberOfReducePhases
Number of times the server performed an incremental reduce phase
Declaration
long NumberOfReducePhases { get; }
Property Value
Type | Description |
---|---|
long |
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 |
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 |
Shards
Gets the statistics about the shards on which the search query was executed.
Declaration
ShardStatistics Shards { get; }
Property Value
Type | Description |
---|---|
Shard |
Suggest
Gets the suggester results.
Declaration
ISuggestDictionary<out TDocument> Suggest { get; }
Property Value
Type | Description |
---|---|
ISuggest |
TerminatedEarly
Gets a value indicating whether the search was terminated early
Declaration
bool TerminatedEarly { get; }
Property Value
Type | Description |
---|---|
bool |
TimedOut
Gets a value indicating whether the search timed out or not
Declaration
bool TimedOut { get; }
Property Value
Type | Description |
---|---|
bool |
Took
Time in milliseconds for OpenSearch to execute the search
Declaration
long Took { get; }
Property Value
Type | Description |
---|---|
long |
Total
Gets the total number of documents matching the search query criteria
Declaration
long Total { get; }
Property Value
Type | Description |
---|---|
long |