Lisa,
see
https://gist.github.com/3347559 for a working example, you are
e.g. having a typo in the index names,
self.noun_index = self.db.node.indexes.create('noun_idx')
vs.
self.noun_index = self.db.indexes.get('noun_idex']
Cheers,
/peter neubauer
G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L:
http://www.linkedin.com/in/neubauer
T: @peterneubauer
Wanna learn something new? Come to @graphconnect.
On Tue, Aug 14, 2012 at 2:03 AM, Lisa Gandy <
lisag...@gmail.com> wrote:
> Hi,
>
> I am creating a reference node "adjective" and storing it in the index so I
> can get it later...
> here's the code
>
> -----1-----------------
> #first creating the index, reference node and storing it...
> self.noun_index = self.db.node.indexes.create('noun_idx')
> self.noun_ref = self.db.node()
> self.noun_index['type']['noun_ref'] = self.noun_ref
>
> ------2------------------
> #then later I use the reference node to add some new nodes and make sure
> they are "connected to" the ref-node
> noun = self.db.node(id=noun_id,lemma=noun_lemma,pos=noun_pos,db=database)
> noun.INSTANCE_OF(self.noun_ref)
>
> ------3-------------------
> #however the next time I run the code and want to actually grab the
> reference
> #node from the index like this....
> self.noun_index = self.db.indexes.get('noun_idex']
> self.noun_ref = self.noun_index['type']['noun_ref']
>
> and then traverse the nouns connected to the reference node (code below in
> step #4)
> -----4-------------
> for relationship in self.noun_ref.INSTANCE_OF:
> noun = relationship.start
> print noun
>
> I get the error "AttributeError: 'IndexCell' object has no attribute
> 'INSTANCE_OF'"
>
> WHAT IS GOING ON!!!!!!!!
>
>