I'm playing around with neo4j, and I was wondering, is it common to have a type
property on nodes that specify what type of Node it is? I've tried searching for this practice, and I've seen some people use name
for a purpose like this, but I was wondering if it was considered a good practice or if indexes would be the more practical method?
An example would be a "User" node, which would have type: user
, this way if the index was bad, I would be able to do an all-node scan and look for types of user
.
Labels have recently been added to Neo4j 2.0 ( http://docs.neo4j.org/chunked/milestone/graphdb-neo4j-labels.html ). They are still under development at the moment, but they address this exact problem.