AWS OpenSearch 索引和域有以下限制:
解决这些限制的方法如下:
示例代码:
// 创建具有字段限制的索引模板 PUT index_template/my_index_template { "index_patterns": ["my_index*"], "template": { "settings": { "index": { "mapping": { "total_fields": { "limit": "50" } } } }, "mappings": { "properties": { "my_field": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 1000 } } } } } } }
// 使用 OpenSearch 索引别名并将多个索引组合在一起 POST _aliases { "actions" : [ { "add" : { "index" : "my_index_1", "alias