amazon-web-services - 通过命令行更新AWS Elasticsearch设置时出错

标签 amazon-web-services elasticsearch

我正在尝试更新AWS Elasticsearch实例的设置。我的命令是:
curl -XPUT "https://<index-endpoint>.es.amazonaws.com/_settings" -d @/path/to/settings.json
我收到以下答复:

{
    "Message":"Your request: '/_settings' is not allowed."
}

我已经读到,并不是所有的ES命令都不会被ES的AWS实例接受,但是我找不到正在执行的替代方法。

注意:

我的设置如下:
{
    "index" : {
        "number_of_shards" : "5",
        "number_of_replicas" : "1",
        "analysis": {
            "analyzer": {
                "urls-links-emails": {
                    "type": "custom",
                    "tokenizer": "uax_url_email"
                }
            }
        }
    }
}

最佳答案

您需要将这些设置应用于特定的索引,因此您的端点必须类似于https://<index-endpoint>.es.amazonaws.com/myindex/_settings
更具体地说,您的命令需要像这样:

curl -XPUT https://<index-endpoint>.es.amazonaws.com/myindex/_settings --data-binary @/path/to/settings.json

关于amazon-web-services - 通过命令行更新AWS Elasticsearch设置时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43941577/

相关文章:

javascript - 带有 TypeScript 4.4.2 和 @types/node 16.7.10 抛出错误类型的 AWS JavaScript SDK v3

amazon-web-services - Amazon CloudDistribution 更新缓慢

amazon-web-services - 为多个 ec-2 实例分配主机名的最佳方法

sorting - 聚合 Elasticsearch 中存储桶的字符串排序

php - elasticsearch php 搜索存在

amazon-ec2 - 文件是否保存在 EBS 卷上?他们不应该被拯救吗?我很困惑

git - 用于 CodeCommit repo 同步的 AWS Lambda

performance - ElasticSearch 预期性能

hibernate - hibernate 全文搜索-按相关性排序结果

docker - 为特定的Docker容器Debian设置max_map_count