Hi all
I've a problem I cannot explain myself in Neo4j.
I want to eliminate nodes with the idcat property values read from a
file.
So I look in the index (LuceneIndexService) for this property, and if
the number of result is 1 I proceed to delete relationships for that
node in order to be able to eliminate the node itself.
But when I try to get the node sometimes I get a NullPointerException in
the last line of this slice of code.
int idcat=Integer.parseInt(line.split(" ")[1]);
IndexHits<Node> nodes = index.getNodes("idcat", idcat);
for(Node n:nodes){
System.out.println("nodes.size:"+nodi.size()+"
properties:"+n.getPropertyKeys());
}
if(nodes.size()==1){
Node el=index.getSingleNode("idcat", idcat);
while(el.hasRelationship()){...}
I controlled with the debugger and the variable el is actually null. The
cycle of println() too doesn't iterate, making me think "nodes" is
really empty.
But so why nodes.size() returns 1 ?
Thanks,
Jacopo
--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
autenticato? GRATIS solo con Email.it http://www.email.it/f
Sponsor:
VOGLIA DI VACANZE ?
* A Riccione i Riviera Park Hotels sono gli alberghi specializzati per le
vacanze nei parchi divertimento.Vieni nei Riviera Park Hotels! Ti aspettano
sconti per tutti i parchi della Romagna! Prenota subito on-line la tua vacanza!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=10607&d=5-7
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user