Chris, now that Tobias is on site again, I got the code to work, it looks like this now:
from __future__ import with_statement import neo4j graphdb = neo4j.GraphDatabase("neodb/test") with graphdb.transaction: addIdx = graphdb.index("address",create=True) n = graphdb.node(color="Red", widht=16, height=32) addIdx[n['color']] = n graphdb.shutdown() graphdb = neo4j.GraphDatabase("neodb/test") with graphdb.transaction: addIdx = graphdb.index("address",create=True) Two points: 1. Indexes are created lazily, so unless you actually add something to it it will not be created, thus not being available on the next opening of the db. 2. addIdx = graphdb.index("address",create=True) is broken, so omitting the create=True breaks things. Always use it, will be rectified upon overhaul of the python bindings. Does this help? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Nov 9, 2010 at 4:38 PM, Chris Diehl <di...@alumni.cmu.edu> wrote: > Hi Peter, > > Just wanted to check in with you to see if you all had a chance to > look at that index reading issue with neo4j.py. We're hoping it's a > quick fix as we would like to use neo4j.py in some experiments we're > doing now. > > Thanks again for looking into this. > > Cheers, Chris > > Message: 1 > Date: Mon, 25 Oct 2010 16:24:39 +0200 > From: Peter Neubauer <peter.neuba...@neotechnology.com> > Subject: Re: [Neo4j] neo4j.py issue reading index > To: Neo4j user discussions <user@lists.neo4j.org> > Message-ID: > <aanlktikbyvwgza7amnqpk=r7jatrhw7x9vfx2gaiy...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Chris, > Andres looked at this today, seems we can reproduce it. The Lucene > folder for the "address" index is created during the transaction, but > not found afterwards. > > So, we will check with Tobias who is maintaining the bindings ASAP (he > is on holiday this week) and get back to you on this. Is that ok? > > Cheers, > > /peter neubauer > > VP Product Management, Neo Technology > > GTalk:? ? ? neubauer.peter > Skype? ? ?? peter.neubauer > Phone? ? ?? +46 704 106975 > LinkedIn?? http://www.linkedin.com/in/neubauer > Twitter? ? ? http://twitter.com/peterneubauer > _______________________________________________ > 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