Skip to content

Commit 788778c

Browse files
authored
[DOCS] Move inner hits content to separate page (#60840) (#60843)
Moves inner hits content from the deprecated 'Request Body Search' chapter to a separate page.
1 parent a761985 commit 788778c

File tree

8 files changed

+27
-13
lines changed

8 files changed

+27
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ By default, {es} reduces the number of network roundtrips between remote
319319
clusters. This reduces the impact of network delays on search speed. However,
320320
{es} can't reduce network roundtrips for large search requests, such as those
321321
including a <<scroll-search-results, scroll>> or
322-
<<request-body-search-inner-hits,inner hits>>.
322+
<<inner-hits,inner hits>>.
323323
+
324324
See <<ccs-min-roundtrips>> to learn how this option works.
325325

docs/reference/redirects.asciidoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ See <<request-body-search-index-boost>>.
7979

8080
[role="exclude",id="search-request-inner-hits"]
8181
=== Inner hits parameter for request body search API
82-
See <<request-body-search-inner-hits>>.
82+
See <<inner-hits>>.
8383

8484
[role="exclude",id="search-request-min-score"]
8585
=== Minimum score parameter for request body search API
@@ -1009,6 +1009,10 @@ See <<highlighting>>.
10091009
10101010
See <<how-es-highlighters-work-internally>>.
10111011
1012+
[role="exclude",id="request-body-search-inner-hits"]
1013+
=== Inner hits
1014+
See <<inner-hits>>.
1015+
10121016
[role="exclude",id="request-body-search-queries-and-filters"]
10131017
=== Named queries
10141018

docs/reference/search/request-body.asciidoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ See <<highlighting>>.
125125

126126
include::request/index-boost.asciidoc[]
127127

128-
include::request/inner-hits.asciidoc[]
128+
[[request-body-search-inner-hits]]
129+
==== Inner hits
130+
131+
See <<inner-hits>>.
129132

130133
include::request/min-score.asciidoc[]
131134

docs/reference/search/request/collapse.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ GET /my-index-000001/_search
7272
<4> how to sort the document inside each group
7373
<5> the number of concurrent requests allowed to retrieve the `inner_hits` per group
7474

75-
See <<request-body-search-inner-hits, inner hits>> for the complete list of supported options and the format of the response.
75+
See <<inner-hits, inner hits>> for the complete list of supported options and the format of the response.
7676

7777
It is also possible to request multiple `inner_hits` for each collapsed hit. This can be useful when you want to get
7878
multiple representations of the collapsed hits.

docs/reference/search/request/inner-hits.asciidoc

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[[request-body-search-inner-hits]]
2-
==== Inner hits
1+
[[inner-hits]]
2+
== Retrieve inner hits
33

44
The <<parent-join, parent-join>> and <<nested, nested>> features allow the return of documents that
55
have matches in a different scope. In the parent/child case, parent documents are returned based on matches in child
@@ -55,7 +55,9 @@ If `inner_hits` is defined on a query that supports it then each search hit will
5555
--------------------------------------------------
5656
// NOTCONSOLE
5757

58-
===== Options
58+
[discrete]
59+
[[inner-hits-options]]
60+
=== Options
5961

6062
Inner hits support the following options:
6163

@@ -78,8 +80,9 @@ Inner hits also supports the following per document features:
7880
* <<request-body-search-version,Include versions>>
7981
* <<request-body-search-seq-no-primary-term,Include Sequence Numbers and Primary Terms>>
8082

83+
[discrete]
8184
[[nested-inner-hits]]
82-
===== Nested inner hits
85+
=== Nested inner hits
8386

8487
The nested `inner_hits` can be used to include nested inner objects as inner hits to a search hit.
8588

@@ -196,8 +199,9 @@ An important default is that the `_source` returned in hits inside `inner_hits`
196199
So in the above example only the comment part is returned per nested hit and not the entire source of the top level
197200
document that contained the comment.
198201

202+
[discrete]
199203
[[nested-inner-hits-source]]
200-
===== Nested inner hits and +_source+
204+
==== Nested inner hits and +_source+
201205

202206
Nested document don't have a `_source` field, because the entire source of document is stored with the root document under
203207
its `_source` field. To include the source of just the nested document, the source of the root document is parsed and just
@@ -312,8 +316,9 @@ Response not included in text but tested for completeness sake.
312316
313317
////
314318

319+
[discrete]
315320
[[hierarchical-nested-inner-hits]]
316-
===== Hierarchical levels of nested object fields and inner hits.
321+
=== Hierarchical levels of nested object fields and inner hits.
317322

318323
If a mapping has multiple levels of hierarchical nested object fields each level can be accessed via dot notated path.
319324
For example if there is a `comments` nested field that contains a `votes` nested field and votes should directly be returned
@@ -433,8 +438,9 @@ Which would look like:
433438

434439
This indirect referencing is only supported for nested inner hits.
435440

441+
[discrete]
436442
[[parent-child-inner-hits]]
437-
===== Parent/child inner hits
443+
=== Parent/child inner hits
438444

439445
The parent/child `inner_hits` can be used to include parent or child:
440446

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Also only leaf fields can be returned via the `stored_fields` option. If an obje
4242
NOTE: On its own, `stored_fields` cannot be used to load fields in nested
4343
objects -- if a field contains a nested object in its path, then no data will
4444
be returned for that stored field. To access nested fields, `stored_fields`
45-
must be used within an <<request-body-search-inner-hits, `inner_hits`>> block.
45+
must be used within an <<inner-hits, `inner_hits`>> block.
4646

4747
[discrete]
4848
[[disable-stored-fields]]

docs/reference/search/search-fields.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ GET my-index-000001/_search
220220
TIP: You cannot use the `docvalue_fields` parameter to retrieve doc values for
221221
nested objects. If you specify a nested object, the search returns an empty
222222
array (`[ ]`) for the field. To access nested fields, use the
223-
<<request-body-search-inner-hits, `inner_hits`>> parameter's `docvalue_fields`
223+
<<inner-hits, `inner_hits`>> parameter's `docvalue_fields`
224224
property.
225225

226226
[discrete]

docs/reference/search/search-your-data.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ include::request/highlighting.asciidoc[]
233233
include::{es-repo-dir}/async-search.asciidoc[]
234234
include::{es-repo-dir}/search/near-real-time.asciidoc[]
235235
include::paginate-search-results.asciidoc[]
236+
include::request/inner-hits.asciidoc[]
236237
include::search-fields.asciidoc[]
237238
include::{es-repo-dir}/modules/cross-cluster-search.asciidoc[]
238239
include::request/sort.asciidoc[]

0 commit comments

Comments
 (0)