Given that Neo4j has a pretty powerful indexing system with Lucene, why can't users create their own reference node(s) and index them in their application?
Like (in pseudo): Graph g = new Graph() Node n = g.newNode() g.putIndex(n,"reference") //later... Node refNode = g.getIndex("reference") I've used Neo4j a lot less than any of you so maybe I don't appreciate something here, but to me this "reference node" concept does seem like an artifact that provides little added value, and was a source of frustration during my thesis. Just my 2 cents. Cheers, Alex On Wed, Dec 15, 2010 at 5:31 PM, Rick Bullotta < rick.bullo...@burningskysoftware.com> wrote: > Thought about that too, and while it's always node zero today, but who > knows > what happens in some future rev with sharding, etc...I'd prefer it to be > opaque to the "how". > > -----Original Message----- > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] > On > Behalf Of Marko Rodriguez > Sent: Wednesday, December 15, 2010 11:26 AM > To: Neo4j user discussions > Subject: [SPAM] Re: [Neo4j] [SPAM] Re: [SPAM] Re: Reference node pains. > > Hi, > > > One reason: how to you obtain that reference node later? Seems to me > you'd > > need to write some code to save the node id, index it, etc... > > If the reference node (=the first node created) is always Vertex Id 0 as > Johan stated in a previous email as being the case, then you simply do: > > Graph.getNodeById(0); > > You can, of course, create your own method: > > public Node getReferenceNode() { > return graph.getNodeById(0); > } > > > I don't understand why, for those that don't want a reference node, > simply > > don't call "getReferenceNode()" (assuming the lazy creation logic is > added). > > ;-) > > ...assuming "lazy creation logic." (which is smart). > > Another argument could be the inverse of my previous email: > > // I like the concept of a reference node > Graph graph = new Neo4j(); > > And for those that don't: > > // I don't like the concept of a reference node > Graph graph = new Neo4j(); > graph.removeNode(graph.getReferenceNode() || graph.getNodeById(0)) > > See ya, > Marko. > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user