[8.14] [DOCS] Remove Upgrade Assistant add default field API (#217264) (#217388)

# Backport

This will backport the following commits from `8.x` to `8.14`:
- [[DOCS] Remove Upgrade Assistant add default field API
(#217264)](https://github.com/elastic/kibana/pull/217264)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2025-04-07T16:31:35Z","message":"[DOCS]
Remove Upgrade Assistant add default field API
(#217264)","sha":"0391d970dbbcf402a7b4f469f4be908921604b76","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","v7.13.5","v7.14.3","v7.15.3","v7.16.4","v8.0.2","v8.1.4","v8.2.4","v8.3.4","v8.4.4","v8.5.4","v8.6.3","v8.7.2","v8.8.3","v8.9.3","v8.10.5","v7.17.17","v8.11.5","v8.12.3","v8.13.5","v8.14.4","backport:version","v8.15.6","v8.19.0","v8.18.1","v8.17.5","v8.16.7"],"title":"[DOCS]
Remove Upgrade Assistant add default field API
","number":217264,"url":"https://github.com/elastic/kibana/pull/217264","mergeCommit":{"message":"[DOCS]
Remove Upgrade Assistant add default field API
(#217264)","sha":"0391d970dbbcf402a7b4f469f4be908921604b76"}},"sourceBranch":"8.x","suggestedTargetBranches":["7.13","7.14","7.15","7.16","8.0","8.1","8.2","8.3","8.4","8.5","8.6","8.7","8.8","8.9","8.10","7.17","8.11","8.12","8.13","8.14","8.15","8.18","8.17","8.16"],"targetPullRequestStates":[{"branch":"7.13","label":"v7.13.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.14","label":"v7.14.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.15","label":"v7.15.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.16","label":"v7.16.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.0","label":"v8.0.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.1","label":"v8.1.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.2","label":"v8.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.3","label":"v8.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.4","label":"v8.4.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.5","label":"v8.5.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.6","label":"v8.6.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.17","label":"v7.17.17","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.11","label":"v8.11.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.12","label":"v8.12.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.13","label":"v8.13.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.14","label":"v8.14.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
This commit is contained in:
Lisa Cawley 2025-04-08 08:13:32 -07:00 committed by GitHub
parent 3e60f320e0
commit d33d7b7b90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 114 deletions

View file

@ -22,6 +22,5 @@ include::upgrade-assistant/status.asciidoc[]
include::upgrade-assistant/reindexing.asciidoc[]
include::upgrade-assistant/batch_reindexing.asciidoc[]
include::upgrade-assistant/batch_queue.asciidoc[]
include::upgrade-assistant/default-field.asciidoc[]
include::upgrade-assistant/check_reindex_status.asciidoc[]
include::upgrade-assistant/cancel_reindex.asciidoc[]

View file

@ -1,113 +0,0 @@
[[upgrade-assistant-api-default-field]]
=== Add default field API
++++
<titleabbrev>Add default field</titleabbrev>
++++
experimental[] In {es} 7.0 and later, some query types, such as Simple Query String, have a limit to the number of fields they can query against.
To configure the cap in {es}, set the `indices.query.bool.max_clause_count` cluster setting, which is 1024 by default.
For indices with more fields than the cap, add the `index.query.default_field` index setting to inform {es} which
fields to use by default when no field is specified for a query. Use the add default field API to add the `index.query.default_field` setting to an {es} index.
[[upgrade-assistant-api-default-field-request]]
==== Request
To add the `index.query.default_field` setting to an {es} index, submit a POST request to `/api/upgrade_assistant/add_query_default_field/<index>`:
[source,js]
--------------------------------------------------
GET /api/upgrade_assistant/add_query_default_field/myIndex
{
"fieldTypes": ["text", "keyword"], <1>
"otherFields": ["myField.*"] <2>
}
--------------------------------------------------
// KIBANA
<1> A required array of {es} field types that generate the list of fields.
<2> An optional array of additional field names, dot-delimited.
To add the `index.query.default_field` index setting to the specified index, {kib} generates an array of all fields from the index mapping.
The fields contain the types specified in `fieldTypes`. {kib} appends any other fields specified in `otherFields` to the array of default fields.
[[upgrade-assistant-api-default-field-response-codes]]
==== Response codes
`200`::
Indicates a successful call.
`400`::
Indicates that the index already has the `index.query.default_field` setting. No changes are made to the index.
[[upgrade-assistant-api-default-field-response-body]]
==== Response body
The response body contains a JSON structure, similar to the following:
[source,js]
--------------------------------------------------
{
"acknowledged": true
}
--------------------------------------------------
[[upgrade-assistant-api-default-field-example]]
==== Example
Your index contains following mappings:
[source,js]
--------------------------------------------------
GET /myIndex/_mappings
{
"myIndex": {
"mappings": {
"properties": {
"field1": { "type": "text" },
"field2": { "type": "float" },
"nestedfield": {
"properties": {
"field3": { "type": "keyword" },
"field4": { "type": "long" },
}
}
}
}
}
}
--------------------------------------------------
// CONSOLE
Make the following request to {kib}:
[source,js]
--------------------------------------------------
GET /api/upgrade_assistant/add_query_default_field/myIndex
{
"fieldTypes": ["text", "long"],
"otherFields": ["field2"]
}
--------------------------------------------------
// KIBANA
The API returns the following:
[source,js]
--------------------------------------------------
GET /myIndex/_settings?flat_settings=true
{
"myIndex": {
"settings": {
"index.query.default_field": [
"field1",
"nestedfield.field4",
"field2",
]
}
}
}
--------------------------------------------------
// CONSOLE
{kib} generates the `field1` and `nestedfield.field4` values based on the specified `fieldTypes`, then appends the `otherFields` to the array.

View file

@ -760,3 +760,8 @@ Refer to {observability-guide}/apm-agent-key-api.html[APM agent Key API].
Refer to {observability-guide}/apm-app-troubleshooting.html[Troubleshooting].
:!apm-docs-move-notice:
[role="exclude",id="upgrade-assistant-api-default-field"]
== Add default field API
This API was removed in 7.13.0. Refer to <<upgrade-assistant-api>>.