AWS OpenSearch Serverless PUT 结果为 404

问题描述 投票:0回答:2

当使用开发工具将数据放入 OpenSearch 中新创建的索引时,响应为 404。

请求无法到达服务器

我正在按照 AWS 教程 使用时间序列数据进行操作。

// Works
PUT analytics-index

// Resolves to 404
PUT analytics-index/_doc/1
{ 
  "foo": "bar",
}

amazon-web-services devops kibana opensearch
2个回答
0
投票

您创建了时间序列集合吗?在这种情况下,

对于时间序列集合,您无法通过自定义文档 ID 进行索引。此操作保留用于搜索用例。

文档

此外,根据 文档

,API 目前不支持没有文档 ID 的 PUT
2 月 22 日更新 - 基于其他评论

0
投票

也许我误解了,但我认为你根本不能传递文档ID:

PUT /simple_country_index/_doc/1
{
  "country": "Philippines"
}

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Document ID is not supported in create/index operation request"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Document ID is not supported in create/index operation request"
  },
  "status": 400
}
© www.soinside.com 2019 - 2024. All rights reserved.