Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-22-2019 09:49 PM
Hi, I am looking for explanation regarding an error I get when I do a Cypher query and understand how I could avoid it :
When I run, from a neobolt driver:
MATCH p1 = (
(read1:Reading:Japanese)<-[:HasReading]-
(word1:Word {writing: '愛'})-[:HasDefinition]->()-[:HasMeaning]->(mean1:Meaning:English)
)
MATCH p2 = (
(read2:Reading:Japanese)<-[:HasReading]-
(word2:Word {writing: '恋'})-[:HasDefinition]->()-[:HasMeaning]->(mean2:Meaning:English)
)
OPTIONAL MATCH meaning_path = allShortestPaths(
(mean1)
-[:IsComposedOf|IsHypernym|IsFrequentWith*1..2]
-(mean2)
)
OPTIONAL MATCH read_path = allShortestPaths(
(read1)-[:HasSimilarSound*0..2]-(read2)
)
// ... simplified query, I would normaly do other stuff in the query, like collect()
return *
I get this error : "neobolt.exceptions.DatabaseError: Node[1297] not connected to this relationship[4155854]"
where Node[1297] Is a Reading node and relationship[4155854] Is a link between Two Meaning.
This error only happpens with certain words and not all of them
My model contains word that have multiple readings ,and multiple definitions with multiple meanings.
Meaning and reading do not connect to each other directly. but meanings are connected to other meanings, and readings are connected to other readings.
Any Idea why this is happening and how I could avoid it ?
Thanks ! 🙂
09-23-2019 03:30 AM
I think the issue is with the code like:
(read1:Reading:Japanese)
You can only have syntax like:
(label:Node)
But not:
(label:Node:AnotherNode)
You might want like this instead?
(read1:Reading) - [:JAPANEASE] -> ()
Or like:
(read1:Reading {language: 'Japanease'})
All the sessions of the conference are now available online