From 3a3030e21746d9d63da237c2d9dcee25d36fb306 Mon Sep 17 00:00:00 2001 From: Adam Menges Date: Tue, 2 Dec 2014 11:51:06 -0800 Subject: [PATCH] Docs: Fix the wording for inner hits a bit Closes #8747 --- .../reference/search/request/inner-hits.asciidoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/reference/search/request/inner-hits.asciidoc b/docs/reference/search/request/inner-hits.asciidoc index 3158d796345..8a4a2f53b64 100644 --- a/docs/reference/search/request/inner-hits.asciidoc +++ b/docs/reference/search/request/inner-hits.asciidoc @@ -1,14 +1,14 @@ [[search-request-inner-hits]] === Inner hits -The <> and <> features allow to return documents that -have matches in a different scope. In the parent/child case parent document are returned based on matches in child -documents or child document are returned based on matches in parent documents. In the nested case documents are returned +The <> and <> features allow the return of documents that +have matches in a different scope. In the parent/child case, parent document are returned based on matches in child +documents or child document 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 is hidden. In many cases -it is very useful to know which inner nested objects in the case of nested or children or 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 +In both cases, the actual matches in the different scopes that caused a document to be returned is hidden. In many cases, +it's very useful to know which inner nested objects (in the case of nested or children or parent documents), or (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. The following snippet explains the basic structure of inner hits: @@ -36,7 +36,7 @@ is parent/child based. Multiple inner hit definitions can be defined in a single request. In the `` any option for features that `inner_hits` support can be defined. Optionally another `inner_hits` definition can be defined in the ``. -If `inner_hits` is defined each search will contain a `inner_hits` json object with the following structure: +If `inner_hits` is defined, each search will contain a `inner_hits` json object with the following structure: [source,js] -------------------------------------------------- @@ -125,7 +125,7 @@ The example below assumes that there is a nested object field defined with the n <1> The inner hit definition is nested and requires the `path` option. <2> The path option refers to the nested object field `comments` -In the above the query is repeated in both the query and the `comment` inner hit definition. At the moment there is +Above, the query is repeated in both the query and the `comment` inner hit definition. At the moment there is no query referencing support, so in order to make sure that only inner nested objects are returned that contributed to the matching of the regular hits, the inner query in the `nested` query needs to also be defined on the inner hits definition.