fix(deploy): 索引校验按标签+属性过滤(neo4j 自动命名,按名匹配永远为空)
This commit is contained in:
@@ -45,7 +45,7 @@ echo "[neo4j-indexes] 目标实例:$URI"
|
||||
run "CREATE INDEX IF NOT EXISTS FOR (e:Entity) ON (e.name_norm);"
|
||||
run "CREATE INDEX IF NOT EXISTS FOR ()-[r:ASSERTS]-() ON (r.relation_category);"
|
||||
|
||||
echo "[neo4j-indexes] 校验(SHOW INDEXES):"
|
||||
echo "[neo4j-indexes] 校验(SHOW INDEXES,按标签+属性过滤——neo4j 自动命名索引,不按名匹配):"
|
||||
"$CYPHER_SHELL" -a "$URI" -u "$USER" -p "$PASSWORD" \
|
||||
"SHOW INDEXES YIELD name, labelsOrTypes, properties, state WHERE name IN ['plantai_normalized_entity_name_norm', 'plantai_normalized_asserts_relation_category'] RETURN name, labelsOrTypes, properties, state;"
|
||||
"SHOW INDEXES YIELD name, labelsOrTypes, properties, state WHERE (labelsOrTypes = ['Entity'] AND properties = ['name_norm']) OR (labelsOrTypes = ['ASSERTS'] AND properties = ['relation_category']) RETURN name, labelsOrTypes, properties, state;"
|
||||
echo "[neo4j-indexes] 完成(幂等,可重复执行)。"
|
||||
|
||||
Reference in New Issue
Block a user