graphaware / neo4j-to-elasticsearch

GraphAware Framework Module for Integrating Neo4j with Elasticsearch
261 stars 57 forks source link

Bulk update fails when index relationship #138

Closed brusic closed 6 years ago

brusic commented 6 years ago

When indexing to elasticsearch via graphaware, the nodes index is being update, but fails when attempting to index the relationships:

2018-10-03 19:39:12.759+0000 WARN [c.g.m.e.ElasticSearchWriter] 6 operations could not be replicated to Elasticsearch. These updates got lost.

I can see the changes in the -node index, so connectivity is working. No errors on the elasticsearch side.

Using the standard settings (com.graphaware.module.ES.* settings omitted)

dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware
com.graphaware.runtime.enabled=true
com.graphaware.module.UIDM.1=com.graphaware.module.uuid.UuidBootstrapper
com.graphaware.module.UIDM.initializeUntil=0
com.graphaware.module.ES.2=com.graphaware.module.es.ElasticSearchModuleBootstrapper

index settings

{
  "neo-relationship": {
    "settings": {
      "index": {
        "creation_date": "1538586865232",
        "number_of_shards": "5",
        "number_of_replicas": "1",
        "uuid": "hDNuSnDYQgCDEwNurnByaw",
        "version": {
          "created": "6040099"
        },
        "provided_name": "neo-relationship"
      }
    }
  },
  "neo-node": {
    "settings": {
      "index": {
        "creation_date": "1521413622141",
        "number_of_shards": "5",
        "number_of_replicas": "1",
        "uuid": "VGHuaRG0QBaFPu6LbHFd3w",
        "version": {
          "created": "6020199"
        },
        "provided_name": "neo-node"
      }
    }
  }
}

Connecting to Elastic Cloud via GrapheneDB with the GraphAware extension using the three jars provided. Using the appropriate jars for Neo4j 3.4.5

graphaware-neo4j-to-elasticsearch-3.4.5.52.10.jar
graphaware-server-community-all-3.4.5.52.jar
graphaware-uuid-3.4.5.52.17.jar
neo4j-server.properties
ikwattro commented 6 years ago

Can you disable bulk mode, so then we can see the exception logged on per node/document basis and paste the logs here then.

Thanks

brusic commented 6 years ago

Was not even aware there was a bulk mode. After disabling bulk updates, the error is now clear: "Rejecting mapping update .. more than 1 type". I guess I need to look into the Json Mapper.

brusic commented 6 years ago

Was about to work on a fix and I started reading the Json Mapper documentation. The plugin requires a mapping file, which is to be placed inside the conf directory, however I am using GrapheneDB, which does not allow adding files. The server extension documentation states: Only files with jar format or neo4j-server.properties are extracted, the rest will be ignored.

It would appear that the two are not compatible. Before I go down a possible fool's errand, is it possible to use GrapheneDB and Elasticsearch 6+?

ikwattro commented 6 years ago

HI @brusic We already deployed neo4j-to-elasticsearch with custom mapping.json file on GrapheneDB, You can just contact them and they will explain what is the procedure to follow.

Feel free to put me in cc of your conversation with GrapheneDB support : christophe (at) graphaware (dot) com

brusic commented 6 years ago

Thanks again. Closing this issue once again. :)

Will test locally and then reach out to support. Wish it was more automated.