Interface IHit<TDocument>
A hit matching a query
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public interface IHit<out TDocument> : IHitMetadata<TDocument> where TDocument : class
Type Parameters
Name | Description |
---|---|
TDocument | The type of the source document |
Properties
| Edit this page View SourceExplanation
An explanation for why the hit is a match for a query
Declaration
[DataMember(Name = "_explanation")]
Explanation Explanation { get; }
Property Value
Type | Description |
---|---|
Explanation |
Fields
The individual fields requested for a hit
Declaration
[DataMember(Name = "fields")]
FieldValues Fields { get; }
Property Value
Type | Description |
---|---|
FieldValues |
Highlight
The field highlights
Declaration
[DataMember(Name = "highlight")]
IReadOnlyDictionary<string, IReadOnlyCollection<string>> Highlight { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IReadOnlyCollection<string>> |
InnerHits
The inner hits
Declaration
[DataMember(Name = "inner_hits")]
IReadOnlyDictionary<string, InnerHitsResult> InnerHits { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, InnerHitsResult> |
MatchedQueries
Which queries the hit is a match for, when a compound query is involved and named queries used
Declaration
[DataMember(Name = "matched_queries")]
IReadOnlyCollection<string> MatchedQueries { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<string> |
Nested
Declaration
[DataMember(Name = "_nested")]
NestedIdentity Nested { get; }
Property Value
Type | Description |
---|---|
NestedIdentity |
Score
The score for the hit in relation to the query
Declaration
[DataMember(Name = "_score")]
double? Score { get; }
Property Value
Type | Description |
---|---|
double? |
Sorts
The sort values used in sorting the hit relative to other hits
Declaration
[DataMember(Name = "sort")]
IReadOnlyCollection<object> Sorts { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<object> |