pub struct InnerHits { /* private fields */ }
Expand description
The parent-join and nested features allow the return of documents that have matches in a different scope. In the parent/child case, parent documents are returned based on matches in child documents or child documents are returned based on matches in parent documents. In the nested case, documents are returned based on matches in nested inner objects.
In both cases, the actual matches in the different scopes that caused a document to be returned are hidden. In many cases, it’s very useful to know which inner nested objects (in the case of nested) or children/parent documents (in the case of parent/child) caused certain information to be returned. The inner hits feature can be used for this. This feature returns per search hit in the search response additional nested hits that caused a search hit to match in a different scope.
Inner hits can be used by defining an inner_hits
definition on a nested
, has_child
or has_parent
query and filter.
https://www.elastic.co/guide/en/elasticsearch/reference/current/inner-hits.html
Implementations§
Source§impl InnerHits
impl InnerHits
Sourcepub fn source<T>(self, source: T) -> Selfwhere
T: Into<SourceFilter>,
pub fn source<T>(self, source: T) -> Selfwhere
T: Into<SourceFilter>,
Indicates which source fields are returned for matching documents
Sourcepub fn name<T>(self, name: T) -> Selfwhere
T: ToString,
pub fn name<T>(self, name: T) -> Selfwhere
T: ToString,
Inner hit name, useful when multiple inner_hits
exist in a single search request
Sourcepub fn docvalue_fields<T>(self, docvalue_fields: T) -> Self
pub fn docvalue_fields<T>(self, docvalue_fields: T) -> Self
A collection of docvalue fields