Browse Source

[DOCS] Move inner hits content to separate page (#60840)

Moves inner hits content from the deprecated 'Request Body Search'
chapter to a separate page.
James Rodewig 5 years ago
parent
commit
ba88f0bd6a

+ 1 - 1
docs/reference/modules/cross-cluster-search.asciidoc

@@ -315,7 +315,7 @@ By default, {es} reduces the number of network roundtrips between remote
 clusters. This reduces the impact of network delays on search speed. However,
 {es} can't reduce network roundtrips for large search requests, such as those
 including a <<scroll-search-results, scroll>> or
-<<request-body-search-inner-hits,inner hits>>.
+<<inner-hits,inner hits>>.
 +
 See <<ccs-min-roundtrips>> to learn how this option works.
 

+ 5 - 1
docs/reference/redirects.asciidoc

@@ -85,7 +85,7 @@ See <<request-body-search-index-boost>>.
 
 [role="exclude",id="search-request-inner-hits"]
 === Inner hits parameter for request body search API
-See <<request-body-search-inner-hits>>.
+See <<inner-hits>>.
 
 [role="exclude",id="search-request-min-score"]
 === Minimum score parameter for request body search API
@@ -1016,6 +1016,10 @@ See <<highlighting>>.
 
 See <<how-es-highlighters-work-internally>>.
 
+[role="exclude",id="request-body-search-inner-hits"]
+=== Inner hits
+See <<inner-hits>>.
+
 [role="exclude",id="request-body-search-queries-and-filters"]
 === Named queries
 

+ 4 - 1
docs/reference/search/request-body.asciidoc

@@ -125,7 +125,10 @@ See <<highlighting>>.
 
 include::request/index-boost.asciidoc[]
 
-include::request/inner-hits.asciidoc[]
+[[request-body-search-inner-hits]]
+==== Inner hits
+
+See <<inner-hits>>.
 
 include::request/min-score.asciidoc[]
 

+ 1 - 1
docs/reference/search/request/collapse.asciidoc

@@ -72,7 +72,7 @@ GET /my-index-000001/_search
 <4> how to sort the document inside each group
 <5> the number of concurrent requests allowed to retrieve the `inner_hits` per group
 
-See <<request-body-search-inner-hits, inner hits>> for the complete list of supported options and the format of the response.
+See <<inner-hits, inner hits>> for the complete list of supported options and the format of the response.
 
 It is also possible to request multiple `inner_hits` for each collapsed hit.  This can be useful when you want to get
 multiple representations of the collapsed hits.

+ 13 - 7
docs/reference/search/request/inner-hits.asciidoc

@@ -1,5 +1,5 @@
-[[request-body-search-inner-hits]]
-==== Inner hits
+[[inner-hits]]
+== Retrieve inner hits
 
 The <<parent-join, parent-join>> and <<nested, 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
@@ -54,7 +54,9 @@ If `inner_hits` is defined on a query that supports it then each search hit will
 --------------------------------------------------
 // NOTCONSOLE
 
-===== Options
+[discrete]
+[[inner-hits-options]]
+=== Options
 
 Inner hits support the following options:
 
@@ -77,8 +79,9 @@ Inner hits also supports the following per document features:
 * <<request-body-search-version,Include versions>>
 * <<request-body-search-seq-no-primary-term,Include Sequence Numbers and Primary Terms>>
 
+[discrete]
 [[nested-inner-hits]]
-===== Nested inner hits
+=== Nested inner hits
 
 The nested `inner_hits` can be used to include nested inner objects as inner hits to a search hit.
 
@@ -193,8 +196,9 @@ An important default is that the `_source` returned in hits inside `inner_hits`
 So in the above example only the comment part is returned per nested hit and not the entire source of the top level
 document that contained the comment.
 
+[discrete]
 [[nested-inner-hits-source]]
-===== Nested inner hits and +_source+
+==== Nested inner hits and +_source+
 
 Nested document don't have a `_source` field, because the entire source of document is stored with the root document under
 its `_source` field. To include the source of just the nested document, the source of the root document is parsed and just
@@ -307,8 +311,9 @@ Response not included in text but tested for completeness sake.
 
 ////
 
+[discrete]
 [[hierarchical-nested-inner-hits]]
-===== Hierarchical levels of nested object fields and inner hits.
+=== Hierarchical levels of nested object fields and inner hits.
 
 If a mapping has multiple levels of hierarchical nested object fields each level can be accessed via dot notated path.
 For example if there is a `comments` nested field that contains a `votes` nested field and votes should directly be returned
@@ -426,8 +431,9 @@ Which would look like:
 
 This indirect referencing is only supported for nested inner hits.
 
+[discrete]
 [[parent-child-inner-hits]]
-===== Parent/child inner hits
+=== Parent/child inner hits
 
 The parent/child `inner_hits` can be used to include parent or child:
 

+ 1 - 1
docs/reference/search/request/stored-fields.asciidoc

@@ -42,7 +42,7 @@ Also only leaf fields can be returned via the `stored_fields` option. If an obje
 NOTE: On its own, `stored_fields` cannot be used to load fields in nested
 objects -- if a field contains a nested object in its path, then no data will
 be returned for that stored field. To access nested fields, `stored_fields`
-must be used within an <<request-body-search-inner-hits, `inner_hits`>> block.
+must be used within an <<inner-hits, `inner_hits`>> block.
 
 [discrete]
 [[disable-stored-fields]]

+ 1 - 1
docs/reference/search/search-fields.asciidoc

@@ -219,7 +219,7 @@ GET my-index-000001/_search
 TIP: You cannot use the `docvalue_fields` parameter to retrieve doc values for
 nested objects. If you specify a nested object, the search returns an empty
 array (`[ ]`) for the field. To access nested fields, use the
-<<request-body-search-inner-hits, `inner_hits`>> parameter's `docvalue_fields`
+<<inner-hits, `inner_hits`>> parameter's `docvalue_fields`
 property.
 
 [discrete]

+ 1 - 0
docs/reference/search/search-your-data.asciidoc

@@ -232,6 +232,7 @@ include::request/highlighting.asciidoc[]
 include::{es-repo-dir}/async-search.asciidoc[]
 include::{es-repo-dir}/search/near-real-time.asciidoc[]
 include::paginate-search-results.asciidoc[]
+include::request/inner-hits.asciidoc[]
 include::search-fields.asciidoc[]
 include::{es-repo-dir}/modules/cross-cluster-search.asciidoc[]
 include::request/sort.asciidoc[]