Agam, Depending on the set of possible values, you could represent the properties with relationships instead. A unique property value can then be represented by a node, which would be linked to all nodes that have that value. The relationship type could indicate the property. The "value" nodes would then be indexed so that you can find the right node when setting the "property" (i.e. creating a relationship to the value node).
Also, it would be great if you could elaborate a bit more on the actual use case behind this algorithm. That way, a more suitable solution might emerge, solving your problem in a different way. Thanks, David On Wed, Feb 23, 2011 at 10:36 PM, Agam Dua <[email protected]> wrote: > Hey > > I'm a graph database and Neo4j newbie and I'm in a bit of a fix: > > *Problem Description* > Let's say I have 'n' nodes in the graph, representing the same type of > object. They have certain undirected links between them. > Now each of these 'n' nodes has the same 10 properties, the *values* of > which may differ. > > *Problem Statement* > Take starting node A. I need to find a way to traverse all the nodes of the > graph and print out which nodes have the most properties in common with A. > For example, if A, C, D, E, F, G have 'x' properties in common I want to > print the nodes. > Then, I want to print the nodes which have 'x-1' properties with the same > value. Then 'x-2', and so on. > > *Question* > Now my question is, is this possible? If so, what would be the best way to > go about it? > > Thanks in advance! > Agam. > * > * > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > -- David Montag Neo Technology, www.neotechnology.com Cell: 650.556.4411 [email protected] _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

