[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.
This commit is contained in:
James Rodewig 2020-08-06 14:06:01 -04:00 committed by GitHub
parent a761985fab
commit 788778c139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 13 deletions

View File

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

View File

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

View File

@ -125,7 +125,10 @@ See <<highlighting>>.
include::request/index-boost.asciidoc[] 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[] include::request/min-score.asciidoc[]

View File

@ -72,7 +72,7 @@ GET /my-index-000001/_search
<4> how to sort the document inside each group <4> how to sort the document inside each group
<5> the number of concurrent requests allowed to retrieve the `inner_hits` per 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 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. multiple representations of the collapsed hits.

View File

@ -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 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 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
-------------------------------------------------- --------------------------------------------------
// NOTCONSOLE // NOTCONSOLE
===== Options [discrete]
[[inner-hits-options]]
=== Options
Inner hits support the following options: Inner hits support the following options:
@ -78,8 +80,9 @@ Inner hits also supports the following per document features:
* <<request-body-search-version,Include versions>> * <<request-body-search-version,Include versions>>
* <<request-body-search-seq-no-primary-term,Include Sequence Numbers and Primary Terms>> * <<request-body-search-seq-no-primary-term,Include Sequence Numbers and Primary Terms>>
[discrete]
[[nested-inner-hits]] [[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. The nested `inner_hits` can be used to include nested inner objects as inner hits to a search hit.
@ -196,8 +199,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 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. document that contained the comment.
[discrete]
[[nested-inner-hits-source]] [[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 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 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.
//// ////
[discrete]
[[hierarchical-nested-inner-hits]] [[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. 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 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:
This indirect referencing is only supported for nested inner hits. This indirect referencing is only supported for nested inner hits.
[discrete]
[[parent-child-inner-hits]] [[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: The parent/child `inner_hits` can be used to include parent or child:

View File

@ -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 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 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` 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] [discrete]
[[disable-stored-fields]] [[disable-stored-fields]]

View File

@ -220,7 +220,7 @@ GET my-index-000001/_search
TIP: You cannot use the `docvalue_fields` parameter to retrieve doc values for 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 nested objects. If you specify a nested object, the search returns an empty
array (`[ ]`) for the field. To access nested fields, use the 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. property.
[discrete] [discrete]

View File

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