0

I'm using a Neo4j Java application with the APOC procedures: xml import and mergeNodes. The xml import is fine, but I can't tell the same for mergeNodes function.

I know how to register APOC procedure, so here the code:

private static void registerApocProcedure(GraphDatabaseService graphDB) throws IllegalArgumentException {
    //Register APOC procedures
    Procedures procedures = ((GraphDatabaseAPI) graphDB).getDependencyResolver().resolveDependency(Procedures.class);
    List<Class<?>> apocProcedures = Arrays.asList(Xml.class, Merge.class, RefactorConfig.class, RefactorResult.class, RelationshipRefactorResult.class, NodeRefactorResult.class);
    apocProcedures.forEach((proc) -> {
        try {
            procedures.registerProcedure(proc);
        } catch (KernelException e) {
            throw new RuntimeException("Error registering "+proc,e);
        }
    });
}

As you can see, I also included some APOC procedures that have similar name to apoc.refactor.mergeNodes, but nothing happens. Probably I'm typing the wrong name, becuase this APOC procedures is built-in so I'm sure it's already present in the library, also because it is documented here

So, how can I call this function?

Wall
  • 293
  • 3
  • 13
  • To avoid somebody could lose the head doing this, the solution is: GraphRefactoring.class – Wall Oct 03 '18 at 16:47

1 Answers1

0

SOLUTION: GraphRefactoring.class

Wall
  • 293
  • 3
  • 13