neo4j / apoc

Apache License 2.0
96 stars 28 forks source link

Don't support relationship indexes in apoc.export.cypher.all #34

Closed neo-technology-build-agent closed 1 year ago

neo-technology-build-agent commented 2 years ago

Issue by alizadehei Wednesday Jun 30, 2021 at 10:03 GMT Originally opened as https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/2048


Hi I tried to export the database using the following query:

CALL apoc.export.cypher.all("db.cypher",{format: "neo4j-shell", useOptimizations: {type: "UNWIND_BATCH",unwindBatchSize: 20}}) After running, I encountered the following error:

Failed to invoke procedure 'apoc.export.cypher.all' : Caused by: java.lang.IllegalStateException: This is not a node index.

It seems that the export procedure only supports node indexes. So what about the relationship indexes?

Versions

neo-technology-build-agent commented 2 years ago

Comment by vga91 Friday Jul 02, 2021 at 07:44 GMT


@alizadehei Thanks for the feedback. Just to let you know, for neo4j 4.3 you should use apoc 4.3.0.0, not the 4.2.0.4. With this version FULLTEXT rel-indexes are managed correctly, however there is a problem with the BTREE indexes, because it does not give your error but exports the rel-indexes as if they were node-indexes. This one will be resolved as soon as possible.

neo-technology-build-agent commented 2 years ago

Comment by alizadehei Saturday Jul 03, 2021 at 03:22 GMT


@vga91 Your welcome. You are right. I used Apoc 4.3.0.0 at first but there was a problem. I added Apoc 4.3.0.0 to the project using the following maven dependency:

<!-- https://mvnrepository.com/artifact/org.neo4j.procedure/apoc -->
<dependency>
    <groupId>org.neo4j.procedure</groupId>
    <artifactId>apoc</artifactId>
    <version>4.3.0.0</version>
</dependency>

but, some functions did not exist in the apoc 4.3.0.0. Among these functions, we can mention cases such as Coll, Maps, Meta, Date, GraphRefactoring, Warmup , ...

gem-neo4j commented 1 year ago

Hey! This works now on 5.x :) 4.4 will export them as well, but we have logged a separate bug that it doesn't handle all cases there (not this exact bug though). I'll close this as 4.3 is no longer supported and we have a fix in the latest series.