> How can I get all the 2000 - 2001, Silver, SAAB? > This is a query based on multiple properties and I think there are three options for this:
- Identify limited property and traverse on that, testing for the others in the traversal. I think this is what Peter was suggesting. So, for example, if we feel that selecting the age will limit the result set the most, traverse down the age tree to the cars in the correct ages, and for all cars found test if they have relations back to the 'silver' and 'saab' nodes. - Make a lucene index on the combinations of properties you are likely to search for. Essentially you are creating a composite key, like '2000-silver-saab', for each car and indexing that in lucene. This can make it slightly tricky to deal with ranges, but integer ranges like 2000-2001 are simply two queries, so not too bad. Adding new properties to the cars requires creating new keys for those cars also. - Create composite index nodes for all unique combinations you are likely to search for. So instead of ref-->colors->silver-->carA and ref-->make-->saab-->carA, you would have ref-->colors-makes-->silver-saab-->carA. Since you are likely to have many 'Silver SAAB's, this is still a decent index tree. If, however, the complete combination of properties becomes too diverse (so the index nodes are as plentify as the car nodes), this becomes less efficient. For your example, it looks good. This last option is my personal favourite (as you can see be searching the mailing lists :-) _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user