更新现有的 Neptune 全文搜索堆栈以支持非字符串索引编制 - Amazon Neptune
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

更新现有的 Neptune 全文搜索堆栈以支持非字符串索引编制

如果您已经在使用 Neptune 全文搜索,则需要采取以下步骤来支持非字符串索引编制:

  1. 停止流轮询器 Lambda 函数。这样可以确保在导出过程中不会复制任何新的更新。为此,请禁用用于调用 Lambda 函数的云事件规则:

    • 在 Amazon Web Services 管理控制台 中,导航到 CloudWatch。

    • 选择规则

    • 选择带有 Lambda 流轮询器名称的规则。

    • 选择禁用以暂时禁用该规则。

  2. 在 OpenSearch 中删除当前 Neptune 索引。使用以下 curl 查询从 OpenSearch 集群中删除 amazon_neptune 索引:

    curl -X DELETE "your OpenSearch endpoint/amazon_neptune"
  3. 开始从 Neptune 一次性导出到 OpenSearch。此时最好设置一个新的 OpenSearch 堆栈,以便为执行导出的轮询器获取新的构件。

    按照 GitHub 中此处列出的步骤,开始将您的 Neptune 数据一次性导出到 OpenSearch 中。

  4. 更新现有流轮询器的 Lambda 构件。成功完成将 Neptune 数据导出到 OpenSearch 后,请执行以下步骤:

    • 在 Amazon Web Services 管理控制台 中,导航到 Amazon CloudFormation。

    • 选择主要的父 Amazon CloudFormation 堆栈。

    • 为该堆栈选择更新选项。

    • 选择从选项替换当前模板

    • 对于模板源,请选择 Amazon S3 URL

    • 对于 Amazon S3 URL,输入:

      https://aws-neptune-customer-samples.s3.amazonaws.com/neptune-stream/neptune_to_elastic_search.json
    • 在不更改任何 Amazon CloudFormation 参数的情况下选择下一步

    • 选择更新堆栈。Amazon CloudFormation 将用最新的构件替换流轮询器的 Lambda 代码构件。

  5. 再次启动流轮询器。为此,请启用相应的 CloudWatch 规则:

    • 在 Amazon Web Services 管理控制台 中,导航到 CloudWatch。

    • 选择规则

    • 选择带有 Lambda 流轮询器名称的规则。

    • 选择启用