mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `8.x` to `8.17`: - [[DOCS] Remove Upgrade Assistant add default field API (#217264)](https://github.com/elastic/kibana/pull/216373) <!--- 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"},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:skip","ci:build-docker-fips"],"title":"Update docker.elastic.co/wolfi/chainguard-base-fips:latest Docker digest to 22d75e2 (8.x)","number":216373,"url":"https://github.com/elastic/kibana/pull/216373"},"sourceBranch":"8.x","suggestedTargetBranches":[],"targetPullRequestStates":[]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
d572dd7d97
commit
ce91dea75c
3 changed files with 6 additions and 114 deletions
|
@ -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[]
|
||||
|
|
|
@ -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.
|
|
@ -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].
|
Loading…
Add table
Add a link
Reference in a new issue