elasticsearch-js icon indicating copy to clipboard operation
elasticsearch-js copied to clipboard

The type `MappingKeywordProperty` is not included in type `MappingProperty`.

Open LvChengbin opened this issue 2 years ago • 1 comments

🐛 Bug Report

https://github.com/elastic/elasticsearch-js/blob/282c76fb6a8260fd7f7d04165e8c65c79ae1627c/src/api/types.ts#L4688

The type MappingKeywordProperty is not included in type MappingProperty.

It causes keyword type cannot be used in client.indices.create method.

Your Environment

  • node version: 18.0.0
  • @elastic/elasticsearch version: 8.2.1
  • os: Mac

LvChengbin avatar Jul 05 '22 17:07 LvChengbin

is this error related? ResponseError: illegal_argument_exception: [illegal_argument_exception] Reason: request [/adds/_doc/ec9eb670-c94a-11ec-b9ff-573a53fd7f95] contains unrecognized parameter: [type] -> did you mean [op_type]? at SniffingTransport.request (/workspace/node_modules/@elastic/transport/lib/Transport.js:476:27) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Client.IndexApi [as index] (/workspace/node_modules/@elastic/elasticsearch/lib/api/api/index.js:51:12) at async /workspace/index.js:35:9

If not anyone no what the issue may be here? i'm getting it on 8.0.0 and 8.1.0 as well as 8.2.1. On hosted elastic version 8.2.1. Stange the same cloud fuction works ok on 7.17.1 running locally.

jamiejacksoncumbria avatar Jul 08 '22 19:07 jamiejacksoncumbria