As I mentioned in #1, I needed a convenient way to keep my ElasticSearch cluster in sync with Neo4J. Taking up where you left off a couple weeks ago, I implemented support for specifying index→label mappings, and property selections. The syntax is a bit different to what you proposed in the README; my version looks like this:
That is, properties prop1 and prop2 of nodes labeled as Label, will be stored in my_index.
Additionaly, the beforeCommit handler in ElasticSearchEventHandler was generating duplicate ElasticSearch actions. To avoid them, beforeCommit now accumulates ES actions in a Map keyed by (indexName, nodeId) instead of a list.
Caveat emptor: I only dabble in Java occasionally, so there might be some unidiomatic code here and there. The tests pass, and this has been working great for the last couple days in a staging instance of my DB, but it should be (stress) tested more thoroughly before using it in production settings.
Hi @jexp,
As I mentioned in #1, I needed a convenient way to keep my ElasticSearch cluster in sync with Neo4J. Taking up where you left off a couple weeks ago, I implemented support for specifying index→label mappings, and property selections. The syntax is a bit different to what you proposed in the README; my version looks like this:
That is, properties
prop1
andprop2
of nodes labeled asLabel
, will be stored inmy_index
.Additionaly, the
beforeCommit
handler inElasticSearchEventHandler
was generating duplicate ElasticSearch actions. To avoid them,beforeCommit
now accumulates ES actions in aMap
keyed by(indexName, nodeId)
instead of a list.Caveat emptor: I only dabble in Java occasionally, so there might be some unidiomatic code here and there. The tests pass, and this has been working great for the last couple days in a staging instance of my DB, but it should be (stress) tested more thoroughly before using it in production settings.
Looking forward to receiving your feedback!