Skip to content

Commit a761985

Browse files
authored
[DOCS] Move script and stored fields content to search fields page (#60826) (#60835)
Changes: * Moves `Retrieve selected fields` to its own page and adds a title abbreviation. * Adds existing script and stored fields content to `Retrieve selected fields` * Adds a xref for `Retrieve selected fields` to `Search your data` * Adds related redirects and updates existing xrefs
1 parent 14980ff commit a761985

19 files changed

+71
-40
lines changed

docs/painless/painless-contexts.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ specialized code may define new ways to use a Painless script.
3131
| Score | <<painless-score-context, Painless Documentation>>
3232
| {ref}/query-dsl-function-score-query.html[Elasticsearch Documentation]
3333
| Field | <<painless-field-context, Painless Documentation>>
34-
| {ref}/search-request-body.html#request-body-search-script-fields[Elasticsearch Documentation]
34+
| {ref}/search-fields.html#script-fields[Elasticsearch Documentation]
3535
| Filter | <<painless-filter-context, Painless Documentation>>
3636
| {ref}/query-dsl-script-query.html[Elasticsearch Documentation]
3737
| Minimum should match | <<painless-min-should-match-context, Painless Documentation>>

docs/painless/painless-contexts/painless-field-context.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=== Field context
33

44
Use a Painless script to create a
5-
{ref}/search-request-body.html#request-body-search-script-fields[script field] to return
5+
{ref}/search-fields.html#script-fields[script field] to return
66
a customized value for each document in the results of a query.
77

88
*Variables*

docs/painless/painless-guide/painless-datetime.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ GET /messages/_search?pretty=true
825825
===== Age of a Message Script Field Example
826826

827827
The following example uses a
828-
{ref}/search-request-body.html#request-body-search-script-fields[script field] as part of the
828+
{ref}/search-fields.html#script-fields[script field] as part of the
829829
<<painless-field-context, field context>> to display the elapsed time between
830830
"now" and when a message was received.
831831

docs/plugins/mapper-size.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ GET my-index-000001/_search
8383
<2> Aggregating on the `_size` field
8484
<3> Sorting on the `_size` field
8585
<4> Uses a
86-
{ref}/search-request-body.html#request-body-search-script-fields[script field]
86+
{ref}/search-fields.html#script-fields[script field]
8787
to return the `_size` field in the search response.
8888
<5> Uses a
89-
{ref}/search-your-data.html#docvalue-fields[doc value
89+
{ref}/search-fields.html#docvalue-fields[doc value
9090
field] to return the `_size` field in the search response. Doc value fields are
9191
useful if
9292
{ref}/modules-scripting-security.html#allowed-script-types-setting[inline

docs/reference/aggregations/metrics/tophits-aggregation.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ The top_hits aggregation returns regular search hits, because of this many per h
2121
* <<request-body-search-explain,Explain>>
2222
* <<named-queries,Named queries>>
2323
* <<source-filtering,Source filtering>>
24-
* <<request-body-search-stored-fields,Stored fields>>
25-
* <<request-body-search-script-fields,Script fields>>
24+
* <<stored-fields,Stored fields>>
25+
* <<script-fields,Script fields>>
2626
* <<docvalue-fields,Doc value fields>>
2727
* <<request-body-search-version,Include versions>>
2828
* <<request-body-search-seq-no-primary-term,Include Sequence Numbers and Primary Terms>>

docs/reference/how-to/search-speed.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ include::../mapping/types/numeric.asciidoc[tag=map-ids-as-keyword]
165165
=== Avoid scripts
166166

167167
If possible, avoid using <<modules-scripting,scripts>> or
168-
<<request-body-search-script-fields,scripted fields>> in searches. See
168+
<<script-fields,scripted fields>> in searches. See
169169
<<scripts-and-search-speed>>.
170170

171171

docs/reference/mapping/types/nested.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ during the highlighting, these offsets will not be available during the main hig
181181
phase. Instead, highlighting needs to be performed via
182182
<<nested-inner-hits,nested inner hits>>. The same consideration applies when loading
183183
fields during a search through <<docvalue-fields,
184-
`docvalue_fields`>> or <<request-body-search-stored-fields, `stored_fields`>>.
184+
`docvalue_fields`>> or <<stored-fields, `stored_fields`>>.
185185
186186
=============================================
187187

docs/reference/ml/anomaly-detection/ml-configuring-transform.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ error count.
153153

154154
The syntax for the `script_fields` property is identical to that used by {es}.
155155
For more information, see
156-
{ref}/search-request-body.html#request-body-search-script-fields[Script fields].
156+
{ref}/search-fields.html#script-fields[Script fields].
157157

158158
You can preview the contents of the {dfeed} by using the following API:
159159

docs/reference/ml/ml-shared.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ Specifies scripts that evaluate custom expressions and returns script fields to
12241224
the {dfeed}. The detector configuration objects in a job can contain functions
12251225
that use these script fields. For more information, see
12261226
{ml-docs}/ml-configuring-transform.html[Transforming data with script fields]
1227-
and <<request-body-search-script-fields,Script fields>>.
1227+
and <<script-fields,Script fields>>.
12281228
end::script-fields[]
12291229

12301230
tag::scroll-size[]

docs/reference/redirects.asciidoc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ See <<request-body-search-rescore>>.
107107

108108
[role="exclude",id="search-request-script-fields"]
109109
=== Script fields parameter for request body search API
110-
See <<request-body-search-script-fields>>.
110+
See <<script-fields>>.
111111

112112
[role="exclude",id="search-request-scroll"]
113113
=== Scroll parameter for request body search API
@@ -136,7 +136,7 @@ See <<source-filtering>>.
136136

137137
[role="exclude",id="search-request-stored-fields"]
138138
=== Stored fields parameter for request body search API
139-
See <<request-body-search-stored-fields>>.
139+
See <<stored-fields>>.
140140

141141
[role="exclude",id="search-request-track-total-hits"]
142142
=== Track total hits parameter for request body search API
@@ -1007,12 +1007,17 @@ See <<highlighting>>.
10071007
[role="exclude",id="highlighter-internal-work"]
10081008
==== How highlighters work internally
10091009
1010+
See <<how-es-highlighters-work-internally>>.
1011+
10101012
[role="exclude",id="request-body-search-queries-and-filters"]
10111013
=== Named queries
10121014
10131015
See <<named-queries>.
10141016
1015-
See <<how-es-highlighters-work-internally>>.
1017+
[role="exclude",id="request-body-search-script-fields"]
1018+
==== Script fields
1019+
1020+
See <<script-fields>>.
10161021
10171022
[role="exclude",id="request-body-search-scroll"]
10181023
==== Scroll
@@ -1030,7 +1035,7 @@ See <<clear-scroll-api>>.
10301035
See <<slice-scroll>>.
10311036
10321037
[role="exclude",id="request-body-search-search-after"]
1033-
==== Search After
1038+
==== Search after
10341039
10351040
See <<search-after>>.
10361041
@@ -1043,4 +1048,9 @@ See <<sort-search-results>>.
10431048
==== Source filtering
10441049
10451050
See <<source-filtering>>.
1051+
1052+
[role="exclude",id="request-body-search-stored-fields"]
1053+
==== Stored fields
1054+
1055+
See <<stored-fields>>.
10461056
////

0 commit comments

Comments
 (0)