AWS Neptune FTS returns 对 OpenSearch 的每个联合查询的 IOException

AWS Neptune FTS returns IOException on every federated queries to OpenSearch

我正在尝试使用 AWS OpenSearch 在 AWS Neptune(引擎 1.0.4.2)上实施 full text search

A GET amazon_neptune/_search 在 OpenSearch returns:

{
  "took": 5,
  "timed_out": false,
  "_shards": {
    "total": 2,
    "successful": 2,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 100000,
      "relation": "gte"
    },
    "max_score": 1.0,
    "hits": [
      {
        "_index": "amazon_neptune",
        "_type": "_doc",
        "_id": "1234567890",
        "_score": 1.0,
        "_source": {
          "entity_id": "aeeA6GHI6ZvK4zOP",
          "document_type": "rdf-resource",
          "predicates": {
            "https://schema.org/description": [
              {
                "value": "value"
              }
            ]
          }
        }
      }
    ]
  }
}

现在,当尝试使用此 SPARQL 执行联合查询时:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX neptune-fts: <http://aws.amazon.com/neptune/vocab/v01/services/fts#>
PREFIX hint: <http://aws.amazon.com/neptune/vocab/v01/QueryHints#>

SELECT ?res WHERE {
  SERVICE neptune-fts:search {
    neptune-fts:config neptune-fts:endpoint 'vpc-{url}.eu-central-1.es.amazonaws.com' .
    neptune-fts:config neptune-fts:queryType 'term' .
    neptune-fts:config neptune-fts:field 'Neptune#fts.document_type' .
    neptune-fts:config neptune-fts:query "rdf-resource" .
    neptune-fts:config neptune-fts:return ?res .
  }
}

...或 Lucene 查询如:

SELECT * WHERE {
  SERVICE neptune-fts:search {
    neptune-fts:config neptune-fts:endpoint 'https://vpc-{url}.eu-central-1.es.amazonaws.com' .
    neptune-fts:config neptune-fts:queryType 'simple_query_string' .
    neptune-fts:config neptune-fts:query "predicates.\schema\description.value:value" .
    neptune-fts:config neptune-fts:return ?res .
  }
}

无论我使用什么查询,我都会得到这个错误:

{
  "code": "BadRequestException",
  "detailedMessage": "An IOException happened while fetching data from ES",
  "requestId": "{id}"
}

我尝试了 SPARQL 联合查询的不同变体,但总是以“从 ES 获取数据时发生 IOException”结束。

那么,这是怎么回事?

提前致谢。

此错误消息可能表示网络或 IAM 身份验证配置不正确。

当 SPARQL 查询运行时,它会尝试将查询联合到 OpenSearch,此时通信失败。

您在使用 IAM 吗?

如果是这样,请确保所有相关组件都具有正确的关联角色以便进行通信,即 OpenSearch 和 Neptune。 (https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth.html)

一个选择是按照我们的云形成模板创建一个新堆栈。这将确保在创建堆栈时考虑所有相关的网络配置,以便您可以更轻松地进行测试: https://docs.aws.amazon.com/neptune/latest/userguide/full-text-search-cfn-create.html