We have currently migrated from @elastic/elasticsearch v7 to 8.1.0. Our development instance is running in a docker container (Ubuntu linux) and locally we are running macOS.
Whenever we perform a bulk load (even with just 1 data entry), we often get the following error message:
`2022-05-05 13:19:37
{"log":" at async ClientTraced.BulkApi [as bulk] (/backend/node_modules/@elastic/elasticsearch/lib/api/api/bulk.js:51:12)\n","stream":"stdout","time":"2022-05-05T11:19:37.181656469Z"}
2022-05-05 13:19:37
{"log":" at processTicksAndRejections (node:internal/process/task_queues:94:5)\n","stream":"stdout","time":"2022-05-05T11:19:37.181651912Z"}
2022-05-05 13:19:37
{"log":" at runMicrotasks (\u003canonymous\u003e)\n","stream":"stdout","time":"2022-05-05T11:19:37.181647135Z"}
2022-05-05 13:19:37
{"log":" at SniffingTransport.request (/backend/node_modules/@elastic/transport/lib/Transport.js:476:27)\n","stream":"stdout","time":"2022-05-05T11:19:37.181639642Z"}
2022-05-05 13:19:37
{"log":"[2022-05-05T11:19:37.180Z] \u001b[31mERROR\u001b[39m ResponseError: illegal_argument_exception: [illegal_argument_exception] Reason: request [/_bulk] contains unrecognized parameter: [waitForActiveShards] -\u003e did you mean [wait_for_active_shards]?\n","stream":"stdout","time":"2022-05-05T11:19:37.181591424Z"}`
Unfortunately this is not consistent. It doesn't happen all the time...We have a couple of APIs running that are calling this service and it seems to be happening in 1 out of 5 calls.
As a test, we updated the code and added the "wait_for_active_shards" parameter in it but it's still throwing the error:
const bulkResponse = await client.bulk({ refresh: true, wait_for_active_shards: "1", operations });
Any help here is appreciated!
Steps to Reproduce
Here is the snippet of code we are using:
const bulkResponse = await client.bulk({ refresh: true, operations });
We also tried the following:
const bulkResponse = await client.bulk({ refresh: true, wait_for_active_shards: "1", operations });
{"log":" at async ClientTraced.BulkApi [as bulk] (/backend/node_modules/@elastic/elasticsearch/lib/api/api/bulk.js:51:12)\n","stream":"stdout","time":"2022-05-05T11:19:37.181656469Z"}
2022-05-05 13:19:37
{"log":" at processTicksAndRejections (node:internal/process/task_queues:94:5)\n","stream":"stdout","time":"2022-05-05T11:19:37.181651912Z"}
2022-05-05 13:19:37
{"log":" at runMicrotasks (\u003canonymous\u003e)\n","stream":"stdout","time":"2022-05-05T11:19:37.181647135Z"}
2022-05-05 13:19:37
{"log":" at SniffingTransport.request (/backend/node_modules/@elastic/transport/lib/Transport.js:476:27)\n","stream":"stdout","time":"2022-05-05T11:19:37.181639642Z"}
2022-05-05 13:19:37
{"log":"[2022-05-05T11:19:37.180Z] \u001b[31mERROR\u001b[39m ResponseError: illegal_argument_exception: [illegal_argument_exception] Reason: request [/_bulk] contains unrecognized parameter: [waitForActiveShards] -\u003e did you mean [wait_for_active_shards]?\n","stream":"stdout","time":"2022-05-05T11:19:37.181591424Z"}
Elasticsearch Version
8.1.0
Installed Plugins
No response
Java Version
bundled
OS Version
ubuntu, macOS
Problem Description
We have currently migrated from @elastic/elasticsearch v7 to 8.1.0. Our development instance is running in a docker container (Ubuntu linux) and locally we are running macOS.
Unfortunately this is not consistent. It doesn't happen all the time...We have a couple of APIs running that are calling this service and it seems to be happening in 1 out of 5 calls.
As a test, we updated the code and added the "wait_for_active_shards" parameter in it but it's still throwing the error:
const bulkResponse = await client.bulk({ refresh: true, wait_for_active_shards: "1", operations });
Any help here is appreciated!
Steps to Reproduce
Here is the snippet of code we are using:
const bulkResponse = await client.bulk({ refresh: true, operations });
We also tried the following:
const bulkResponse = await client.bulk({ refresh: true, wait_for_active_shards: "1", operations });
Here is the mapping of the index:
{ "settings": { "analysis": { "analyzer": { "products_custom_analyzer": { "tokenizer": "standard", "filter": [ "lowercase", "english_stemmer" ] } }, "filter": { "english_stemmer": { "type": "stemmer", "name": "english" } }, "normalizer": { "lowercase_normalizer": { "filter": [ "lowercase" ], "type": "custom" } } } }, "mappings": { "properties": { "createdAt": { "type": "date" }, "productdescription": { "type": "text", "term_vector": "yes", "fields": { "searchable": { "type": "search_as_you_type" } } }, "brand": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "status": { "type": "keyword" }, "price": { "type": "double" }, "currency": { "type": "keyword" }, "image": { "type": "text", "analyzer": "products_custom_analyzer" }, "category": { "type": "keyword" }, "marketplace_category": { "type": "text", "analyzer": "products_custom_analyzer" }, "public_visible": { "type": "boolean" }, "company": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "mfrpartid": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "sku": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "batch_number": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "availability": { "type": "keyword" }, "incoterms": { "type": "keyword" }, "available_quantity": { "type": "double" }, "available_quantity_uom": { "type": "keyword" }, "tiered_pricing_quantity": { "type": "double" }, "has_price": { "type": "boolean" }, "request_quote": { "type": "boolean" }, "allow_bidding": { "type": "boolean" }, "asset_transfer": { "type": "boolean" }, "technical_specifications": { "type": "nested", "properties": { "specification": { "type": "text", "analyzer": "products_custom_analyzer", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "value": { "type": "text", "analyzer": "products_custom_analyzer", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } }, "condition": { "type": "keyword" }, "visibility": { "type": "text" }, "source": { "type": "keyword" }, "sites": { "type": "nested", "include_in_root": true, "properties": { "city": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "country": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "point": { "type": "geo_point" } } } } } }
Logs (if relevant)