我有一个问题。我的Elasticsearch索引应具有电子邮件分析器,以正确的方式存储电子邮件。因此,我在config中创建了新的分析器,并调用了方法client.indices.putSettings
(Node.js)。但是官方文档说,首先我们需要为索引调用_close
方法,然后再调用putSettings
。
当我使用Docker镜像时,该方法执行时没有任何问题。但是在AWS上,我遇到以下异常:
Your request: '/index/_close' is not allowed by Amazon Elasticsearch Service.
如何将自定义设置设置为Amazon Elasticsearch Service?
最佳答案
您的原始标题是“如何在ElasticSearch上放置设置”,但您的问题的内容是询问特定的错误。
回答原始标题 AWS Elasticsearch Service:如何进行设置?
The node.js documentation for ElasticSearch涵盖putSettings()
client.indices.putSettings({
index: string | string[],
master_timeout: string,
timeout: string,
preserve_existing: boolean,
ignore_unavailable: boolean,
allow_no_indices: boolean,
expand_wildcards: 'open' | 'closed' | 'none' | 'all',
flat_settings: boolean,
body: object
})
body
在general HTTP API中定义
关于node.js - AWS Elasticsearch:putSettings 'is not allowed'的关闭索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57256933/