Re: [Neo4j] Batch find

2011-08-08 Thread ahmed.elsharkasy
still how can i get the whole words of a document in one shot to be able to define the nodes which shall be inserted by batch and the nodes which shall be updated -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Batch-find-tp3221634p3235279.html Sent from

Re: [Neo4j] Batch find

2011-08-08 Thread Michael Hunger
How many words are contained in your text document ? Probably not millions or billions? Then using the batch-inserter API for that is not sensible. Otherwise (except if you're really experiencing performance issues) I would stay with the iteration across the words (of your word-set). You might

Re: [Neo4j] Batch find

2011-08-08 Thread Michael Hunger
Yes, just executing a number of java API calls in a single tx, this is just what the REST API does. Batching is here on the protocol level, i.e. you need only one network operation (and serializer/deserializer call) for the whole set of operations (and those concerns are all not relevant in

Re: [Neo4j] Batch find

2011-08-08 Thread Michael Hunger
Ahmed, could you please share some code? Batch-Inserter should really only be used to insert millions or billions of nodes. With the normal API you can insert/update about 10k nodes/rels per transaction without any issues. You should be able to insert/update several thousand nodes per second

Re: [Neo4j] Batch find

2011-08-08 Thread 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,

Re: [Neo4j] Batch find

2011-08-08 Thread Michael Hunger
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

Re: [Neo4j] Batch find

2011-08-08 Thread ahmed.elsharkasy
yes this is my initial load of the db yes i know i maybe mixing both of them and this is not right but how can i do the same functionality and using the batch operations can i remove the transaction and insert/update with batch? -- View this message in context:

Re: [Neo4j] Batch find

2011-08-08 Thread ahmed.elsharkasy
Also what is the reason of the delay still? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Batch-find-tp3221634p3235850.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___

Re: [Neo4j] Batch find

2011-08-08 Thread Michael Hunger
I don't see why there should be any delay. if you just try this, it should be able to add several thousand nodes per second to the graph. GraphDatabaseService graphdb = new EmbeddedGraphDatabase(words.db); IndexNode index = graphdb.index().forNodes(words); for (Document doc : documents) {

[Neo4j] Batch find

2011-08-03 Thread ahmed.elsharkasy
how can i batch find a whole document in neo4j instead of looping through the document words and searching one by one? am using java -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Batch-find-tp3221634p3221634.html Sent from the Neo4j Community

Re: [Neo4j] Batch find

2011-08-03 Thread Peter Neubauer
Ahmed, are you tying to find a text or name, or a node? I am not sure as to what you mean. Do you have some example code so we can understand your problem better? Cheers, /peter neubauer GTalk:      neubauer.peter Skype       peter.neubauer Phone       +46 704 106975 LinkedIn  

Re: [Neo4j] Batch find

2011-08-03 Thread ahmed.elsharkasy
I am trying to insert a document containing list of words , and i wont to check whether some of this words are already in my graph and in this case i will update their properties otherwise i will create new nodes with the new words -- View this message in context:

Re: [Neo4j] Batch find

2011-08-03 Thread Niels Hoogeveen
04:14:44 -0700 From: ahmed.elshark...@gmail.com To: user@lists.neo4j.org Subject: Re: [Neo4j] Batch find I am trying to insert a document containing list of words , and i wont to check whether some of this words are already in my graph and in this case i will update their properties

Re: [Neo4j] Batch find

2011-08-03 Thread Niels Hoogeveen
That should be without having to do any lookups From: pd_aficion...@hotmail.com To: user@lists.neo4j.org Date: Wed, 3 Aug 2011 13:37:44 +0200 Subject: Re: [Neo4j] Batch find The batch insert is intended to push data into the database with having to do any look ups. You could

Re: [Neo4j] Batch find

2011-08-03 Thread Rick Bullotta
[mailto:user-boun...@lists.neo4j.org] On Behalf Of ahmed.elsharkasy Sent: Wednesday, August 03, 2011 7:15 AM To: user@lists.neo4j.org Subject: Re: [Neo4j] Batch find I am trying to insert a document containing list of words , and i wont to check whether some of this words are already in my graph