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

Reply via email to