node.js - AWS Elasticsearch:putSettings 'is not allowed'的关闭索引?

标签 node.js amazon-web-services elasticsearch config

我有一个问题。我的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
})
bodygeneral HTTP API中定义

关于node.js - AWS Elasticsearch:putSettings 'is not allowed'的关闭索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57256933/

相关文章:

javascript - 使用 Node.JS 下载 Torrent

javascript - 我可以并行运行多少个 NodeJS Express 服务器?

amazon-web-services - 更新 AWS ECS 服务

object - 如何为自定义对象列表声明嵌套字段类型?

elasticsearch - 过滤掉元数据字段,只返回elasticsearch中的源字段

javascript - 调试未处理的 Promise 拒绝

node.js - 你如何在 Mongoose 中将 _id 从 ObjectID 更改为 Number

amazon-web-services - Lambda Cloudformation 遇到不支持的属性值错误

python - 在 Cloudformation 中使用时无法从 S3 下载引导文件

docker - 无法从Docker容器连接到计算机的本地主机