I'm using node.js Elasticsearch 7.17 client to create default index settings, and I'd like the total_fields limit to be more than the default 1000. When I try the following:
export const defaultCaseIndexSettings: IndicesIndexSettings = {
'index.number_of_replicas': 0,
'index.number_of_shards': 6,
'index.max_result_window': Number(INDEX_MAX_RESULT_WINDOW),
'index.mapping.total_fields.limit': 10000,
etc.
}
it seems that index.mapping.total_fields.limit is not a setting that can be set on IndicesIndexSettings. I've also tried:
export const defaultCaseSettingsIndexConfig: IndicesCreateRequest['body'] = {
settings: {
index: {
number_of_shards: '2',
number_of_replicas: '2',
mapping: {
total_fields: {
limit: 10000,
},
},
},
},
and that gives me the message that Object literal may only specify known properties, and 'mapping' does not exist in type 'IndicesIndexSettings'. How can I set the total_fields limit using nodejs Elasticsearch client?