Skip to content

Commit

Permalink
[DOCS] Relocate request body param docs to search API docs (#56436) (#…
Browse files Browse the repository at this point in the history
…56523)

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
  • Loading branch information
jrodewig authored May 11, 2020
1 parent bd4d01e commit 88a54e7
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 79 deletions.
8 changes: 0 additions & 8 deletions docs/reference/search/request-body.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ results.

include::request/docvalue-fields.asciidoc[]

include::request/explain.asciidoc[]

include::request/collapse.asciidoc[]

include::request/from-size.asciidoc[]
Expand All @@ -124,8 +122,6 @@ include::request/post-filter.asciidoc[]

include::request/preference.asciidoc[]

include::request/query.asciidoc[]

include::request/rescore.asciidoc[]

include::request/script-fields.asciidoc[]
Expand All @@ -136,14 +132,10 @@ include::request/search-after.asciidoc[]

include::request/search-type.asciidoc[]

include::request/seq-no.asciidoc[]

include::request/sort.asciidoc[]

include::request/source-filtering.asciidoc[]

include::request/stored-fields.asciidoc[]

include::request/track-total-hits.asciidoc[]

include::request/version.asciidoc[]
15 changes: 0 additions & 15 deletions docs/reference/search/request/explain.asciidoc

This file was deleted.

15 changes: 0 additions & 15 deletions docs/reference/search/request/query.asciidoc

This file was deleted.

16 changes: 0 additions & 16 deletions docs/reference/search/request/seq-no.asciidoc

This file was deleted.

15 changes: 0 additions & 15 deletions docs/reference/search/request/version.asciidoc

This file was deleted.

88 changes: 78 additions & 10 deletions docs/reference/search/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,16 @@ include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
Defaults to `open`.

`explain`::
(Optional, boolean) If `true`, returns detailed information about score
computation as part of a hit. Defaults to `false`.
(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]
+
Expand Down Expand Up @@ -126,7 +134,7 @@ testing.

[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
matching the `query` request body parameter are not returned.
====
Expand All @@ -148,8 +156,17 @@ level settings.
include::{docdir}/rest-api/common-parms.asciidoc[tag=search_type]

`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`::
(Optional, integer) Defines the number of hits to return. Defaults to `10`.
Expand Down Expand Up @@ -232,13 +249,35 @@ include the total number of hits matching the query.
by their respective types in the response. Defaults to `true`.

`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]]
==== {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]
+
--
Expand All @@ -249,10 +288,24 @@ parameters are specified, only the query parameter is used.
====
--

[[search-api-request-body-query]]
[[request-body-search-query]]
`query`::
(Optional, <<query-dsl,query object>>) Defines the search definition using the
<<query-dsl,Query DSL>>.
(Optional, <<query-dsl,query object>>) Defines the search definition using the
<<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`::
(Optional, integer) The number of hits to return. Defaults to `10`.
Expand Down Expand Up @@ -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"]
[[search-api-response-body]]
==== {api-response-body-title}
Expand Down

0 comments on commit 88a54e7

Please sign in to comment.