graphaware / neo4j-to-elasticsearch

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

Conflict with apoc functions #145

Closed DaveClissold closed 5 years ago

DaveClissold commented 5 years ago

When reinitializing the database with the plugin switched on all apoc functions become unkown

ERROR Could not execute query MATCH (n:Producer) WHERE id(n) = {id} RETURN apoc.text.join([n.name, n.country]," ") AS value. Message is Unknown function 'apoc.text.join' (line 1, column 46 (offset: 45))

But when initialization is cmplete and the browser loads, the functions are recognised and useable again.

Any ideas of a work around to tackle this? Config file is as below

#**** Proceedures Whitelist *******
dbms.security.procedures.unrestricted=ga.*,apoc.* 

#**** APOC plugin ****
apoc.export.file.enabled=true

#**** GraphAware Framwork ****
com.graphaware.runtime.enabled=true
dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware

#**** GraphAware UUID ****
com.graphaware.module.UIDM.1=com.graphaware.module.uuid.UuidBootstrapper
com.graphaware.module.UIDM.uuidProperty=_id
com.graphaware.module.UIDM.relationship=com.graphaware.runtime.policy.all.IncludeAllBusinessRelationships
com.graphaware.module.UIDM.initializeUntil=1

#**** GraphAware Neo4J to ES ****
com.graphaware.module.ES.2=com.graphaware.module.es.ElasticSearchModuleBootstrapper
com.graphaware.module.ES.protocol=https
com.graphaware.module.ES.uri=elastic:WeLoveWine@elastic.fleyver.com
com.graphaware.module.ES.port=443
com.graphaware.module.ES.authUser=elastic
com.graphaware.module.ES.authPassword=WeLoveWine
com.graphaware.module.ES.keyProperty=_id
com.graphaware.module.ES.retryOnError=false
com.graphaware.module.ES.queueSize=1000
com.graphaware.module.ES.reindexBatchSize=5000
com.graphaware.module.ES.bulk=true
com.graphaware.module.ES.initializeUntil=9999999999999999
com.graphaware.module.ES.mapping=com.graphaware.module.es.mapping.JsonFileMapping
com.graphaware.module.ES.file=mappings.json
com.graphaware.module.ES.asyncIndexation=true
ikwattro commented 5 years ago

@DaveClissold Thanks for reporting the issue, I'm not sure this is something we would fix as a community support. To be fair it is an edge case, neo4j extensions are registered serially. In our framework we ensure with the help of the module number ( module.es.2 ) that you can define the order in which extensions are loaded for avoiding such issues with modules having a dependency on other modules. APOC not being part of our stack we cannot ensure it will be loaded before or after.

In order to ensure APOC's plugin is loaded at a certain position, we would actually have to write a framework module for this, which is not something we would do and maintain in public.

KR

Christophe

DaveClissold commented 5 years ago

@ikwattro Ok thanks for the heads up on this Christophe, best get the funding sorted so that I can get the enterprise support!

HSan88 commented 3 years ago

Dear @ikwattro No solution yet? I really need to this