Showing results for 
Search instead for 
Did you mean: 

Why does this relationship query return results that don't meet condition?

Graph Fellow
MATCH p=()-[r:coOccur]->() WHERE r.confidence>0.9 RETURN p limit 25
I have a graph that have all Tag nodes and their coOccur relationship. The coOccur has a property confidence which has value between 0 and 1. However, my query above also returns relationships that have confidence<0.9. I thought the WHERE clause doesn't effect. However, if I change the RETURN clause to;
RETURN count(p)
the number of relationships changes when I vary the confidence score, and this seems to say that the r.confidence is effective.
So why does the query give relationships with lower confidence than 0.9?


Seems odd. I created some test data and used your query. It worked as expected. See below...

Can you provide some test data and/or screenshots?

Test Data:

Screen Shot 2022-11-22 at 11.28.49 PM.png

Query Results:

Screen Shot 2022-11-22 at 11.32.07 PM.png