How to implement full text search using AWS Neptune as the source

筅森魡賤 提交于 2019-12-24 07:27:45

问题


I've seen on other questions that Gremlin & Neptune do not support full text search natively.

How can I provide this feature as part of my web-site?

Ideally it would be not require running up more infrastructure/software that I have to look after.

Thinking that some options are using an external search service like Solr or ElasticSearch. What about another AWS service? Cloudsearch?

thanks


回答1:


Your question is very timely. Integration between Amazon Neptune and ElasticSearch was just launched [1]. As you add data to a graph, Neptune will automatically keep an ElasticSearch index up to date using the Streams feature. This is similar in approach to what you were considering building but with the added advantage that you can access the index directly from your graph queries rather than needing to write wrapper code that calls the index and then calls Neptune. You can use the ElasticSearch index in your Gremlin and/or SPARQL queries by simply including some "magic" strings in the query that will tell Neptune to use the ElasticSearch index rather than its own internal indices. You have control over things like which ElasticSearch query API a given Gremlin/SPARQL query should use. Instructions on how to setup the environment, which does not take long are included at the same link [1]. Hopefully this will help with your use case. As a side note, another benefit of the feature is that, when working with Gremlin, you do not need a specially modified client library to take advantage of these new capabilities.

[1] https://docs.aws.amazon.com/neptune/latest/userguide/full-text-search.html




回答2:


CloudSearch is good choice but note that "looking after" it will be inevitable. You will at least need an error monitoring/logging mechanism that enables you to see what queries have failed and to track down why. Maybe diacritics handling was not ok, for instance. However, do note that some code for wiring Neptune with CloudSearch will be needed, I do not know of any out of the box method to transfer certain data from Neptune as index to CS. At least a Lambda-function. Lambda functions are worth considering.



来源:https://stackoverflow.com/questions/58977120/how-to-implement-full-text-search-using-aws-neptune-as-the-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!