neo4j-contrib / neo4j-elasticsearch

Neo4j ElasticSearch Integration
Apache License 2.0
210 stars 79 forks source link

Initial import doesn't work. #46

Open mksriram opened 6 years ago

mksriram commented 6 years ago

Neo4J Version : 3.2.2 ElasticSearch : 6.2.2

Hello

My graph.db consists of the nodes that are provided in the example in Neo4j browser. This example consists of Person and Movie.

The data flows between neo4j and elastic when we perform a create of these nodes.

However, if I delete all indexes and try to force a import by following the instructions below, I do not see anything happening.

To perform an initial import, I tried to execute the following commands to force a commit by executing a Cypher query like:

MATCH (n:Person) SET n.name = n.name;

MATCH (n:Movie) SET n.title = n.title;

This has no effect and the elastic db doesn't seem to get the data from Neo4J.

What is it that I could be doing wrong here? Any help would be really useful

Thanks Sriram

mksriram commented 6 years ago

Neo4J Version : 3.2.2 ElasticSearch : 6.2.2

bradeac commented 5 years ago

Also experiencing this. Would be happy if someone shares a way to make this work.

lpanichi commented 5 years ago

Same here, creating/updating a node works but impossible to import the nodes already in place when the plugin was installed. It feels like I'm gonna have to copy all the nodes and relationships...

EDIT So sorry.... Just keep readings the threads and as said by jexp : "neo4j doesn't write properties that haven't changed." So instead of MATCH (n:Person) SET n.name = n.name

i runed twice MATCH (n:Person) SET n.name = reverse(n.name)

and now i can take my meal Nice plugin btw :+1:

hansyulian commented 5 years ago

I was going to put a comment also that mine not working, but thanks to the idea:

@lpanichi

i runed twice
MATCH (n:Person)
SET n.name = reverse(n.name)

and then i come up with another trouble which is i see that neo4j.log said 413: Request entity too large i ended up realized that my indexes are beyond the limit (around 1gb) for initial load, so i added the http.max_content_length: 4096mb in elasticsearch.yml, maybe some people that have trouble with the integration come here also, hope this help

cafarmer commented 5 years ago

reverse() did not work for me. Neo4j complained about a type issue... suggesting that I cast something as a string. I will work on that. But this needs to work unless I am missing something because I need to be able to set analyzer settings on the mappings and do not want to have to unwind everything just so I can re-index with those new mappings. (delete all documents and re-populate without having to delete the entire index/mappings). I wanted to add a node field to an existing index... couldn't do it.

lpanichi commented 5 years ago

@cafarmer reverse is for reversing lists. It seems that it's not what you are trying to import in ES. Just use any transformation in order to trigger the plugin. For instance, if you are trying to push integers, just do +1 then -1 (maybe doing +0 works, I didn't try it). Anyway a glimpse on your data and on your conf file could help to help... FYI, I'm using graphaware ES plugin now and I find it more convenient, you should give it a try.