Neo4j indexing error?

After asking about Neo4j caches without having a final solution, I kept on testing Neo4j as the database we are probably using in production. However, we are faced with a new problem with indexing attributes with specific labels.

The thing is, somehow Neo4j is not getting the correct data if I query a node by label and attribute (which happens to have the same name). I took some screenshots of what was going on, hoping it would help figure out how I figured out what might be the error. These are two examples of what happens with two different labels.

enter image description here

I have label A and label B , and attributes a and b . If you read from bottom to top, you can see that I am following these steps:

  • I request the nodes to attribute a (unlabeled) <- works
  • I am querying nodes labeled A and the a <- attribute is not working (using index)
  • I am requesting nodes with label A and attribute b <- works
  • I am requesting nodes with label B and attribute a <- works
  • I am querying nodes labeled B and attribute b <- works (using index)

I also added additional columns to my query (they have no effect) to check that both columns have the same value, as well as checking the labels.

I only have this problem if an attribute is indexed using a label of the same name . This means that the label is A and the attribute is a . However, this does not happen with label B and attribute b . At least not this time, because playing the same script with a different label attribute name (by rule A ... a ) causes the same problem.

I don't need to be told that there is no outside influence, so I have complete control over what happens in my database.

EDIT:

enter image description here

+3


source to share


1 answer


Your # 1 didn't really work, as you should have gotten (at least) 2 lines (one for each label).

In your RETURN statements, you must include id(n)

so you can see which nodes are being returned. Right now, it's not clear.



edited

OK, with the specified ids, it is now clear that we are talking about a single node with multiple shortcuts. So it certainly looks like a strange bug. If you see this in the latest version, you should consider creating an issue for this at github.com/neo4j/neo4j/issues.

+1


source







All Articles