[DOCS] Relocate request body param docs to search API docs (#56436)

Moves documentation for the following request body parameters to the
search API reference docs:

* `explain`
* `query`
* `seq_no_primary_term`
* `version`

Removes documentation for these parameters from the Request body search
page[0].

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html
This commit is contained in:
James Rodewig 2020-05-11 11:29:38 -04:00 committed by GitHub
parent 3ab6eba6bc
commit 2be6d7b8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 78 additions and 79 deletions

View File

@ -104,8 +104,6 @@ results.
include::request/docvalue-fields.asciidoc[] include::request/docvalue-fields.asciidoc[]
include::request/explain.asciidoc[]
include::request/collapse.asciidoc[] include::request/collapse.asciidoc[]
include::request/from-size.asciidoc[] include::request/from-size.asciidoc[]
@ -124,8 +122,6 @@ include::request/post-filter.asciidoc[]
include::request/preference.asciidoc[] include::request/preference.asciidoc[]
include::request/query.asciidoc[]
include::request/rescore.asciidoc[] include::request/rescore.asciidoc[]
include::request/script-fields.asciidoc[] include::request/script-fields.asciidoc[]
@ -136,8 +132,6 @@ include::request/search-after.asciidoc[]
include::request/search-type.asciidoc[] include::request/search-type.asciidoc[]
include::request/seq-no.asciidoc[]
include::request/sort.asciidoc[] include::request/sort.asciidoc[]
include::request/source-filtering.asciidoc[] include::request/source-filtering.asciidoc[]
@ -145,5 +139,3 @@ include::request/source-filtering.asciidoc[]
include::request/stored-fields.asciidoc[] include::request/stored-fields.asciidoc[]
include::request/track-total-hits.asciidoc[] include::request/track-total-hits.asciidoc[]
include::request/version.asciidoc[]

View File

@ -1,15 +0,0 @@
[[request-body-search-explain]]
==== Explain
Enables explanation for each hit on how its score was computed.
[source,console]
--------------------------------------------------
GET /_search
{
"explain": true,
"query" : {
"term" : { "user" : "kimchy" }
}
}
--------------------------------------------------

View File

@ -1,15 +0,0 @@
[[request-body-search-query]]
==== Query
The query element within the search request body allows to define a
query using the <<query-dsl,Query DSL>>.
[source,console]
--------------------------------------------------
GET /_search
{
"query" : {
"term" : { "user" : "kimchy" }
}
}
--------------------------------------------------

View File

@ -1,16 +0,0 @@
[[request-body-search-seq-no-primary-term]]
==== Sequence Numbers and Primary Term
Returns the sequence number and primary term of the last modification to each search hit.
See <<optimistic-concurrency-control>> for more details.
[source,console]
--------------------------------------------------
GET /_search
{
"seq_no_primary_term": true,
"query" : {
"term" : { "user" : "kimchy" }
}
}
--------------------------------------------------

View File

@ -1,15 +0,0 @@
[[request-body-search-version]]
==== Version
Returns a version for each search hit.
[source,console]
--------------------------------------------------
GET /_search
{
"version": true,
"query" : {
"term" : { "user" : "kimchy" }
}
}
--------------------------------------------------

View File

@ -75,8 +75,16 @@ include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
Defaults to `open`. Defaults to `open`.
`explain`:: `explain`::
(Optional, boolean) If `true`, returns detailed information about score (Optional, boolean) If `true`, returns detailed information about score
computation as part of a hit. Defaults to `false`. computation as part of a hit. Defaults to `false`.
+
--
[IMPORTANT]
====
You can also specify this value using the `explain` request body parameter. If
both parameters are specified, only the query parameter is used.
====
--
include::{docdir}/rest-api/common-parms.asciidoc[tag=from] include::{docdir}/rest-api/common-parms.asciidoc[tag=from]
+ +
@ -126,7 +134,7 @@ testing.
[IMPORTANT] [IMPORTANT]
==== ====
The `q` parameter overrides the <<search-api-request-body-query,`query`>> The `q` parameter overrides the <<request-body-search-query,`query`>>
parameter in the request body. If both parameters are specified, documents parameter in the request body. If both parameters are specified, documents
matching the `query` request body parameter are not returned. matching the `query` request body parameter are not returned.
==== ====
@ -148,8 +156,17 @@ level settings.
include::{docdir}/rest-api/common-parms.asciidoc[tag=search_type] include::{docdir}/rest-api/common-parms.asciidoc[tag=search_type]
`seq_no_primary_term`:: `seq_no_primary_term`::
(Optional, boolean) If `true`, returns sequence number and primary term of the +
last modification of each hit. --
(Optional, boolean) If `true`, returns sequence number and primary term of the
last modification of each hit. See <<optimistic-concurrency-control>>.
[IMPORTANT]
====
You can also specify this value using the `seq_no_primary_term` request body
parameter. If both parameters are specified, only the query parameter is used.
====
--
`size`:: `size`::
(Optional, integer) Defines the number of hits to return. Defaults to `10`. (Optional, integer) Defines the number of hits to return. Defaults to `10`.
@ -232,13 +249,35 @@ include the total number of hits matching the query.
by their respective types in the response. Defaults to `true`. by their respective types in the response. Defaults to `true`.
`version`:: `version`::
(Optional, boolean) +
If `true`, returns document version as part of a hit. Defaults to `false. --
(Optional, boolean)
If `true`, returns document version as part of a hit. Defaults to `false`.
[IMPORTANT]
====
You can also specify this value using the `version` request body parameter. If
both parameters are specified, only the query parameter is used.
====
--
[[search-search-api-request-body]] [[search-search-api-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}
[[request-body-search-explain]]
`explain`::
(Optional, boolean) If `true`, returns detailed information about score
computation as part of a hit. Defaults to `false`.
+
--
[IMPORTANT]
====
You can also specify this value using the `explain` request body parameter. If
both parameters are specified, only the query parameter is used.
====
--
include::{docdir}/rest-api/common-parms.asciidoc[tag=from] include::{docdir}/rest-api/common-parms.asciidoc[tag=from]
+ +
-- --
@ -249,10 +288,24 @@ parameters are specified, only the query parameter is used.
==== ====
-- --
[[search-api-request-body-query]] [[request-body-search-query]]
`query`:: `query`::
(Optional, <<query-dsl,query object>>) Defines the search definition using the (Optional, <<query-dsl,query object>>) Defines the search definition using the
<<query-dsl,Query DSL>>. <<query-dsl,Query DSL>>.
[[request-body-search-seq-no-primary-term]]
`seq_no_primary_term`::
+
--
(Optional, boolean) If `true`, returns sequence number and primary term of the
last modification of each hit. See <<optimistic-concurrency-control>>.
[IMPORTANT]
====
You can also specify this value using the `seq_no_primary_term` query parameter.
If both parameters are specified, only the query parameter is used.
====
--
`size`:: `size`::
(Optional, integer) The number of hits to return. Defaults to `10`. (Optional, integer) The number of hits to return. Defaults to `10`.
@ -291,6 +344,21 @@ parameters are specified, only the query parameter is used.
==== ====
-- --
[[request-body-search-version]]
`version`::
+
--
(Optional, boolean)
If `true`, returns document version as part of a hit. Defaults to `false`.
[IMPORTANT]
====
You can also specify this value using the `version` query parameter. If both
parameters are specified, only the query parameter is used.
====
--
[role="child_attributes"] [role="child_attributes"]
[[search-api-response-body]] [[search-api-response-body]]
==== {api-response-body-title} ==== {api-response-body-title}