【问题标题】:Neo4j fulltext index is not created from apoc.confNeo4j 全文索引不是从 apoc.conf 创建的
【发布时间】:2022-01-15 06:52:42
【问题描述】:

我有一个基于 neo4j:4.4 的自定义 neo4j docker 镜像。 在它启动时,我需要执行一些密码语句,其中包括创建全文索引。我正在使用 apoc.conf 文件:

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")

create_fulltext_indexes.cypher文件有以下内容:

CREATE FULLTEXT INDEX CustomerIndex IF NOT EXISTS FOR (n:Customer) ON EACH [n.name];

当我启动 docker 容器时,我在日志中看到执行了 create_fulltext_indexes.cypher,没有显示任何错误,但没有创建 CustomerIndexcreate_regular_indexes.cypher 中的索引是正常创建的。

另外,如果我尝试在容器中运行以下命令:

cypher-shell -u user -p password "CALL apoc.cypher.runSchemaFile(\"file:////var/lib/neo4j/db_init/create_fulltext_indexes.cypher\")"

CustomerIndex 没有创建,但是当我在 neo4j 浏览器中运行 cypher 语句时,它工作正常。

CREATE FULLTEXT INDEX CustomerIndex IF NOT EXISTS FOR (n:Customer) ON EACH [n.name];

对我做错了什么有什么想法吗?

【问题讨论】:

  • 我会尝试将它们合并到一个文件中

标签: neo4j full-text-search neo4j-apoc


【解决方案1】:

这是 neo4j 中的一个错误,已创建 GitHub 问题: https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/2395

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-20
    • 1970-01-01
    相关资源
    最近更新 更多