I have a custom neo4j docker image based on neo4j:4.4
On it's startup, I need to execute a few cypher statements, which includes a creation of fulltext index. I am doing it using apoc.conf file:
apoc.import.file.use_neo4j_config=false
apoc.import.file.enabled=true
apoc.export.file.enabled=true
apoc.initializer.neo4j.0=CALL apoc.cypher.runSchemaFile("file:////var/lib/neo4j/db_init/create_regular_indexes.cypher")
apoc.initializer.neo4j.1=CALL apoc.cypher.runSchemaFile("file:////var/lib/neo4j/db_init/create_fulltext_indexes.cypher")
The create_fulltext_indexes.cypher file has the following content:
CREATE FULLTEXT INDEX CustomerIndex IF NOT EXISTS FOR (n:Customer) ON EACH [n.name];
When I start the docker container, I see in the logs that the create_fulltext_indexes.cypher is executed, no errors are shown, but the CustomerIndex is not created. The indexes from create_regular_indexes.cypher are created normally.
Also, if I try to run the following command in the container:
cypher-shell -u user -p password "CALL apoc.cypher.runSchemaFile(\"file:////var/lib/neo4j/db_init/create_fulltext_indexes.cypher\")"
The CustomerIndex is not created, but when I am running the cypher statement from create_fulltext_indexes.cypher file in the neo4j browser, it works fine.
Any thoughts on what I am doing wrong?