Ahmed,

is this your initial load of the graphdb?

It looks like your mixing batch-insertion and normal transactional API in a 
single program.

Please try to use just one in one program.

I'd really suggest just go with the transactional API and insert / update one 
or more document(s) per transaction.

What are you using "reference" for? that is set to the "created" or "result" 
node(id)?

Am 08.08.2011 um 16:29 schrieb ahmed.elsharkasy:

>        Transaction tx = graphDb.beginTx();
>        try {
> 
>            for (all words in a document){
>               // search for the word
> 
>                if (result == null) {
>                    long created = inserter.createNode(properties);
>                    wordsIndex.add(created, properties);
> 
>                    Map<String, Object> properties2 =
> MapUtil.map("value", reference);
> 
>                   //create relation
> 
>                    reference = created;
> 
>                } else {
>                 // update with the new properties
>                    inserter.setNodeProperties(result, new_properties);
> 
>                    //create relation 
> 
>                    reference = result;
> 
>                }
>            }
> 
>        } finally {
>            tx.finish();
>            index.shutdown();
>            inserter.shutdown();
>            graphDb.shutdown();
>        }
> 
> --
> View this message in context: 
> http://neo4j-community-discussions.438527.n3.nabble.com/Batch-find-tp3221634p3235721.html
> Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
> _______________________________________________
> 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

Reply via email to