mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 09:28:27 +00:00
This commit is contained in:
parent
67e7c3f60e
commit
ef9b14b07e
@ -139,6 +139,29 @@ PUT /logs/_mapping
|
||||
}
|
||||
----
|
||||
====
|
||||
+
|
||||
To add the mapping only to the stream's write index, set the put mapping API's
|
||||
`write_index_only` query parameter to `true`.
|
||||
+
|
||||
.*Example*
|
||||
[%collapsible]
|
||||
====
|
||||
The following put mapping request adds the new `message` field mapping only to
|
||||
the `logs` stream's write index. The new field mapping is not added to the
|
||||
stream's other backing indices.
|
||||
|
||||
[source,console]
|
||||
----
|
||||
PUT /logs/_mapping?write_index_only=true
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
[discrete]
|
||||
[[change-existing-field-mapping-in-a-data-stream]]
|
||||
@ -214,6 +237,34 @@ PUT /logs/_mapping
|
||||
}
|
||||
----
|
||||
====
|
||||
+
|
||||
To apply the mapping changes only to the stream's write index, set the put mapping API's
|
||||
`write_index_only` query parameter to `true`.
|
||||
+
|
||||
.*Example*
|
||||
[%collapsible]
|
||||
====
|
||||
The following put mapping request changes the `host.ip` field's mapping only for
|
||||
the `logs` stream's write index. The change is not applied to the stream's other
|
||||
backing indices.
|
||||
|
||||
[source,console]
|
||||
----
|
||||
PUT /logs/_mapping?write_index_only=true
|
||||
{
|
||||
"properties": {
|
||||
"host": {
|
||||
"properties": {
|
||||
"ip": {
|
||||
"type": "ip",
|
||||
"ignore_malformed": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
Except for supported mapping parameters, we don't recommend you change the
|
||||
mapping or field data type of existing fields, even in a data stream's matching
|
||||
|
Loading…
x
Reference in New Issue
Block a user