Hi Johan, Do you mean a utility that creates a new Neo4j instance and copies all entities into it from an old Neo4j instance? That's definitely no problem.
I've written a bit of import/export code in my graph_gen_utils branch. I have a GraphReader interface which is generic and only contains getNodes() & getRels() methods definitions, which return iterators. The iterators are of type NodeData, basically a HashMap of HashMap for simplicity. 1 NodeData can contain 1 Node with Properties and all it's Relationships with Properties. Then I implemented various readers that I needed during the thesis. For example, ChacoParser, GMLParser, TwitterParser (proprietry format), etc which all implement GraphReader. Similarly for GraphWriter... That made it easy for me to add any parser and use my existing methods for buffering multiple entities into Transactions, etc. It's far from perfect, but might give an idea or two. Maybe some of that could be reused, although someone would definitely need to evaluate the quality of my code first. Blueprints has some import functionality too (.graphml format for example). Cheers, Alex On Wed, Jun 2, 2010 at 2:30 PM, Johan Svensson <jo...@neotechnology.com>wrote: > Alex, > > You are correct about the "holes" in the store file and I would > suggest you export the data and then re-import it again. Neo4j is not > optimized for the use case were more data is removed than added over > time. > > It would be possible to write a compacting utility but since this is > not a very common use case I think it is better to put that time into > producing a generic export/import dump utility. The plan is to get a > export/import utility in place as soon as possible so any input on how > that should work, what format to use etc. would be great. > > -Johan > > On Wed, Jun 2, 2010 at 9:23 AM, Alex Averbuch <alex.averb...@gmail.com> > wrote: > > Hey, > > Is there a way to compact the data stores (relationships, nodes, > properties) > > in Neo4j? > > I don't mind if its a manual operation. > > > > I have some datasets that have had a lot of relationships removed from > them > > but the file is still the same size, so I'm guessing there are a lot of > > holes in this file at the moment. > > > > Would this be hurting lookup performance? > > > > Cheers, > > Alex > _______________________________________________ > 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