Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-09-2021 02:13 PM
Neo4j version: 4.2.5
Java Driver version: 4.1.1 & 4.2.4
See attached screenshot. The following query returns a node with a wrong label:
MATCH (n:NodeInterface:YWRYQFALBS:SchemaNode:NodeInterface) WHERE n.`name` = "Group" RETURN DISTINCT n
I was not able to reproduce the issue with a simple set of statemets. It occurs randomly during our integration test suite when different test threads execute multiple statements with random identifiers (NCRLAOJOUF and YWRYQFALBS in this case).
Do you see anything that could possibly be changed to fix the query? It looks like a bug, but without a simple reproduction. Should I open an issue on github?
Thank you!
04-11-2021 04:34 AM
Hello,
I have few questions:
04-11-2021 04:44 AM
Based on the available information i have a solution. I have considered the following database structure:
Create (h1:HUMAN{gender:"Male", age:"43"})-[o:OWNS{since:"2021"}]->(p1:PROPERTY{type:"Building", constructedOn:"03-02-2020"}),
(h2:HUMAN{gender:"Female", age:"33",name:"Mini"})-[o1:OWNS]->(a1:ANIMAL{type:"Dog", name:"Goofy"}),
(h1)-[:KNOWS]->(h2)-[:KNOWS]->(h1)
The query which works to what you wish to extract.
Match (a)
Unwind labels(a) as nodelabels
With nodelabels as nodelabels, a as a
Where nodelabels = 'HUMAN' OR nodelabels = 'PROPERTY'
Return a
In the query i am filtering based on the node labels and i am assuming that each node has only one node label associated with it. However, the query can be modified in the WHERE clause to support the searching for multiple node labels.
All the sessions of the conference are now available online