eq.pageのような特定のノードが、他のノード..likeタグとの関連性を持っているかどうかを検索する必要があります。Neo4j-cypherクエリーでの複数の一致ステートメント(if else条件付き)
If they are connected to tag nodes then search for the search string in page name and the tag names Else search for the search string in page name only
MATCH ...//nodes of certain type
WHERE
if r is null'
...//Match query without relation for searching
else
...//Match query without relation for searching
Return ...
MATCH (n:page)<-[r:pagetag]-(tag)
if r is null
then n.title CONTAINS 'java'or tag.name IN ["java"]
return distinct n.name
else n.title CONTAINS 'java'return distinct n.name
END
このクエリはエラーを与えています。構文上の問題があります。しかし、私はこのようなページだけのために検索したいです。
私はのif-else –
はいための条件はhttp://stackoverflow.com/questions/27576427/cypher-neo4j-case-expression-with-merge – Mvde
を見るようにしたいような場合は、クエリを持つことができます私の質問をもう一度読んでください。私は理解できないかもしれませんが、その質問は私を助けませんでした。 –