Neo4j and ElasticSearch

I am having graphaware nlp framework in order to accept nlp queries. Now I want to integrate elastic search along with neo4j in order to make match nlp queries with database nodes that I have. Is anyone available to show me how the integration of Elastic search can work with neo4j. I am following different repositories and also the documentation inside neo4j but it has been unsuccessful untill now.

Hi,
Are you planning to query elastic search and Neo4J in the same request? If so there are apoc libraries to query elastic search. In Cypher you can use these methods to query elastic and neo4j in the same session.

Please take a look at

https://neo4j.com/docs/labs/apoc/current/database-integration/elasticsearch/

for more examples

Hello,
Thank you for the response. So the idea is here:
1-I have 1 neo4j database for the nlp (that is going to accept all the queries and create tokens with them)
2- I have 1 neo4j database for some products
3- I want to use elasticsearch to make the matching between the first database and the second one and also then try to do recommendations based on search.
Is it something that can work? If yes is there any repository where I can look for the integration of elasticsearch inside neo4j so I can make calls from the 1st DB to ElasticSearch and get results??

The APOC library can make calls to ES and process the results within Neo4J context in Cypher query.

https://neo4j.com/docs/labs/apoc/current/database-integration/elasticsearch/

Here's a sample usage from that page.

CALL apoc.es.query('localhost','test-index','test-type','name:Neo4j&size=1&scroll=5m',null) yield value with value._scroll_id as scrollId, value.hits.hits as hits
// Do something with hits
UNWIND hits as hit
// Here we simply create a document and a relation to a company
MERGE (doc:Document {id: hit._id, description: hit._source.description, name: hit._source.name})

This is reading data from ES and writing to Neo4J in the same Cypher query.

Does this satisfy your requirement?