如何以最小的延迟从 Elasticsearch 更新 neo4j 图形数据库?
How to update a neo4j graph database from an Elastic Search with mimimal latency?
我有许多定期更新的 Elastic Search 索引,我希望将这些更新反映在 neo4j 图形数据库中,在 Elastic Search 中为项目编制索引之间的延迟最小并将其更新为 Neo4j。
(同样,减少管理工作也很重要:例如,我只想更新一个密码语句来定义索引文档和图形之间的映射,这样一旦我创建了一个索引, 将其数据添加到 Neo4j 是有限的工作。
是否可以使用弹性搜索来做到这一点 watchers and triggers?或者通过其他方式?
我知道 APOC 库的 Elastic Search functions in Neo4j, but I'd rather push from Elastic Search on update than pull from Neo4j. GraphAware also have an extension,但它似乎主要针对 Neo4j 到 ES 的方向。
ElasticSearch 触发器可以 post 一个 HTTP 请求,而 Neo4j 有一个 HTTP Api,所以这似乎是可行的:https://neo4j.com/docs/http-api/current/
如果我要在生产中这样做,我可能会开发一个微服务来侦听 webhook 并将数据存储到 Neo4j 中。这样你就可以引入重试策略,如果没有别的,也可以记录错误。
经过一些研究后,您可以配置 ElasticSearch 以使用 https://github.com/malike/elasticsearch-kafka-watch, and then ingest the data with the Neo4j Kafka Sink.
等工具将更新推送到 Kafka
我有许多定期更新的 Elastic Search 索引,我希望将这些更新反映在 neo4j 图形数据库中,在 Elastic Search 中为项目编制索引之间的延迟最小并将其更新为 Neo4j。
(同样,减少管理工作也很重要:例如,我只想更新一个密码语句来定义索引文档和图形之间的映射,这样一旦我创建了一个索引, 将其数据添加到 Neo4j 是有限的工作。
是否可以使用弹性搜索来做到这一点 watchers and triggers?或者通过其他方式?
我知道 APOC 库的 Elastic Search functions in Neo4j, but I'd rather push from Elastic Search on update than pull from Neo4j. GraphAware also have an extension,但它似乎主要针对 Neo4j 到 ES 的方向。
ElasticSearch 触发器可以 post 一个 HTTP 请求,而 Neo4j 有一个 HTTP Api,所以这似乎是可行的:https://neo4j.com/docs/http-api/current/
如果我要在生产中这样做,我可能会开发一个微服务来侦听 webhook 并将数据存储到 Neo4j 中。这样你就可以引入重试策略,如果没有别的,也可以记录错误。
经过一些研究后,您可以配置 ElasticSearch 以使用 https://github.com/malike/elasticsearch-kafka-watch, and then ingest the data with the Neo4j Kafka Sink.
等工具将更新推送到 Kafka