mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ES 9.0] Remove body workaround (@elastic/security-entity-analytics
) (#217225)
## Summary Follow up to https://github.com/elastic/kibana/pull/213375: The latest version of the ES client fixed the issue https://github.com/elastic/elasticsearch-js/issues/2584. We should be able to remove all usages of `// @ts-expect-error elasticsearch@9.0.0 https://github.com/elastic/elasticsearch-js/issues/2584`.
This commit is contained in:
parent
86fab6e2b4
commit
e7dbe43e28
2 changed files with 2 additions and 4 deletions
|
@ -89,8 +89,7 @@ export const updateUnderlyingMapping = async ({ logger, esClient, index }: Updat
|
|||
|
||||
try {
|
||||
await retryTransientEsErrors(
|
||||
// @ts-expect-error elasticsearch@9.0.0 https://github.com/elastic/elasticsearch-js/issues/2584
|
||||
() => esClient.indices.putMapping({ index, body: simulatedMapping }),
|
||||
() => esClient.indices.putMapping({ index, ...simulatedMapping }),
|
||||
{ logger }
|
||||
);
|
||||
logger.info(`Update mappings for ${index}`);
|
||||
|
|
|
@ -40,8 +40,7 @@ export const createOrUpdateIndex = async ({
|
|||
indices.map(async (index) => {
|
||||
try {
|
||||
await retryTransientEsErrors(
|
||||
// @ts-expect-error elasticsearch@9.0.0 https://github.com/elastic/elasticsearch-js/issues/2584
|
||||
() => esClient.indices.putMapping({ index, body: options.mappings }),
|
||||
() => esClient.indices.putMapping({ index, ...options.mappings }),
|
||||
{ logger }
|
||||
);
|
||||
logger.info(`Update mappings for ${index}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue