[8.18] [DOCS] Remove Upgrade Assistant add default field API (#217264) (#217372)

# Backport

This will backport the following commits from `8.x` to `8.18`:
- [[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:14:20 -07:00 committed by GitHub
parent 4b98c0f475
commit 12295390de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 217 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

@ -1221,3 +1221,9 @@ Refer to {api-kibana}/group/endpoint-roles[role APIs].
== Create or update role API
Refer to {api-kibana}/group/endpoint-roles[role APIs].
[role="exclude",id="upgrade-assistant-api-default-field"]
== Add default field API
This API was removed in 7.13.0.
Refer to {api-kibana}/group/endpoint-upgrade[upgrade assistant APIs].

View file

@ -24666,54 +24666,6 @@ paths:
summary: Get Timelines or Timeline templates
tags:
- Security Timeline API
/api/upgrade_assistant/add_query_default_field/{index}:
get:
description: |
In Elasticsearch 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 Elasticsearch, 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 Elasticsearch 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 Elasticsearch index.
To add the `index.query.default_field` index setting to the specified index, Kibana generates an array of all fields from the index mapping. The fields contain the types specified in `fieldTypes`. Kibana appends any other fields specified in `otherFields` to the array of default fields.
operationId: get-upgrade-default
requestBody:
content:
application/json:
examples:
addQueryDefaultFieldExampleRequest1:
description: Run `GET /api/upgrade_assistant/add_query_default_field/myIndex` to add the `index.query.default_field` setting to an Elasticsearch index.
value: |-
{
"fieldTypes": ["text", "keyword"],
"otherFields": ["myField.*"]
}
schema:
type: object
properties:
fieldTypes:
description: |
An array of Elasticsearch field types that generate the list of fields.
type: array
otherFields:
description: |
An optional array of additional field names, dot-delimited.
type: array
required:
- fieldTypes
required: true
responses:
'200':
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
description: Indicates a successful call.
'400':
description: Indicates that the index already has the `index.query.default_field` setting. No changes are made to the index.
summary: Add a default field
tags:
- upgrade
x-state: Technical Preview
/api/upgrade_assistant/reindex/{index}:
get:
description: |

View file

@ -13,61 +13,6 @@ tags:
servers:
- url: /
paths:
/api/upgrade_assistant/add_query_default_field/{index}:
get:
summary: Add a default field
description: >
In Elasticsearch 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 Elasticsearch, 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 Elasticsearch 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 Elasticsearch index.
To add the `index.query.default_field` index setting to the specified index, Kibana generates an array of all fields from the index mapping.
The fields contain the types specified in `fieldTypes`.
Kibana appends any other fields specified in `otherFields` to the array of default fields.
x-state: Technical Preview
operationId: get-upgrade-default
tags:
- upgrade
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- fieldTypes
properties:
fieldTypes:
type: array
description: >
An array of Elasticsearch field types that generate the list of fields.
otherFields:
type: array
description: >
An optional array of additional field names, dot-delimited.
examples:
addQueryDefaultFieldExampleRequest1:
description: Run `GET /api/upgrade_assistant/add_query_default_field/myIndex` to add the `index.query.default_field` setting to an Elasticsearch index.
value: |-
{
"fieldTypes": ["text", "keyword"],
"otherFields": ["myField.*"]
}
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
# description:
'400':
description: Indicates that the index already has the `index.query.default_field` setting. No changes are made to the index.
/api/upgrade_assistant/status:
get:
summary: Get the upgrade readiness status