Re: [Neo4j] cant use index after commit

2011-08-08 Thread ahmed.elsharkasy
i am still facing the same exception when i try to delete a node with this code Transaction tx = graphDb.beginTx(); node.delete(); graphDb.index().forNodes(wordsIndexName).remove(node); tx.success(); tx.finish() i get this exception at tx.finish SEVERE: Commit failed

Re: [Neo4j] Easy to switch from Embedded to HighAvailability graph?

2011-08-08 Thread Andreas Kollegger
Hi Raffi, That's a very sensible approach to scaling up the capacity of your system. Because you are embedding Neo4j, you can simply switch to using HighAvailabilityGraphDatabase instead of EmbeddedGraphDatabase, as described here: http://wiki.neo4j.org/content/High_Availability_Cluster You

Re: [Neo4j] is there a limit to how much data rest batch can take?

2011-08-08 Thread Michael Hunger
Could you please have a look at data/graph.db/messages.log and data/log/*.log if there are more detailed stack-traces about this error (esp. more caused by). Thanks Michael Am 08.08.2011 um 05:09 schrieb Boris Kizelshteyn: I should add that I can insert the same calls one by one without

Re: [Neo4j] cant use index after commit

2011-08-08 Thread Michael Hunger
What operating system are you running on, which version of neo4j and how many threads are running in parallel? Could you also try to reverse the operations (i.e. first do the index.remove() and then then node.delete();) Thanks Michael Am 08.08.2011 um 08:13 schrieb ahmed.elsharkasy: i am

Re: [Neo4j] cant use index after commit

2011-08-08 Thread ahmed.elsharkasy
i am running on Ubuntu 11.04 , neo4j advanced-1.4 and i use only one thread but i use nested transaction i.e there is an outer transaction beside the transaction shown in the code , any problems with that? i tried reversing the order but still the same problem -- View this message in context:

Re: [Neo4j] neo4j spatial via rest, weird error

2011-08-08 Thread Peter Neubauer
Thanks Michael, just applied the change. Testing and committing. Cheers, /peter neubauer GTalk:      neubauer.peter Skype       peter.neubauer Phone       +46 704 106975 LinkedIn   http://www.linkedin.com/in/neubauer Twitter      http://twitter.com/peterneubauer http://www.neo4j.org           

Re: [Neo4j] cant use index after commit

2011-08-08 Thread Michael Hunger
is the that the commit of the outer tx where it fails? and do you finish the outer tx sucessfully? does it work with a single transaction? Cheers Michael Am 08.08.2011 um 09:01 schrieb ahmed.elsharkasy: i am running on Ubuntu 11.04 , neo4j advanced-1.4 and i use only one thread but i use

Re: [Neo4j] cant use index after commit

2011-08-08 Thread Michael Hunger
Ahmed, I tried it both on MacOS and Ubuntu with the following example and it worked fine. public class Test { public static void main(String[] args) throws IOException { final ImpermanentGraphDatabase graphDb = new ImpermanentGraphDatabase(); try {

Re: [Neo4j] cant use index after commit

2011-08-08 Thread ahmed.elsharkasy
is their any problem if my logic needs to shutdown the graph before the inner transaction and start it again directly before it? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/cant-use-index-after-commit-tp3233038p3234930.html Sent from the Neo4j

Re: [Neo4j] cant use index after commit

2011-08-08 Thread ahmed.elsharkasy
finally i solved the problem :) The problem was that i my logic before the node deletion , i used the batchInserterIndex and IndexProviders Objects and when i shutdown them and start a graph database instance , i only shut down the inserter and forgot to shutdown the provider Thanks a lot for

Re: [Neo4j] cant use index after commit

2011-08-08 Thread Michael Hunger
Why would you want to do that? You should shutdown the graphdb only at the end of your program. Michael Am 08.08.2011 um 10:38 schrieb ahmed.elsharkasy: is their any problem if my logic needs to shutdown the graph before the inner transaction and start it again directly before it? --

Re: [Neo4j] cant use index after commit

2011-08-08 Thread ahmed.elsharkasy
i mean the graphdatabaseService , how can i keep it open while opening a batchInserter instance? i think i cant access the store with both of them at the same time -- View this message in context:

Re: [Neo4j] cant use index after commit

2011-08-08 Thread Michael Hunger
ok, you can't use them both in one go that's right. so after shutting down the batch-inserter-index-provider and the batch-inserter you can use the embedded API on the same store. That's also how Neo4j-Spatial does it's two step import of openstreetmap data. First bulk load the data and then

[Neo4j] finding top 10 shortest path

2011-08-08 Thread Reza Ameri
Hi every one, I'm really new to Neo4j and really shocked of this big and useful DBMS that seems to solve any problem that I have! after working on the neo4j in my java application, I could finally create an astar traverse, which is really cool! But there is one other need, how can I find top (n)

Re: [Neo4j] Enhanced API rewrite

2011-08-08 Thread Niels Hoogeveen
I can probably find the time for that. It would be fun working on these ideas in collaboration. I don't mind producing my usual brain-dumps and write some of the code, but quality will certainly improve when it is more than just me paying attention to this. Niels From:

Re: [Neo4j] cant use index after commit

2011-08-08 Thread ahmed.elsharkasy
what will save me from doing so is if there is a way to batch find a group of words in one time using java instead of iterating through words and searching for one by one -- View this message in context:

Re: [Neo4j] cant use index after commit

2011-08-08 Thread Michael Hunger
You can use the lucene query API to do that (see http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Fields) nodeIndex.query(name: word1 OR name:word2 OR name: word3); If that is what you mean by batch finding a group of words Michael Am 08.08.2011 um 12:54 schrieb ahmed.elsharkasy:

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] Multiple threads sharing a transaction

2011-08-08 Thread Mattias Persson
Hi Paul, sorry for late response. Are you sure that thread 2 is using the same transaction instance? How do you go about doing that btw, the only way is to get a hold of the low level TransactionManager and do suspend/resume of that transaction. It might very well be that you only think that both

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

[Neo4j] Multiple Server Instances: delayed performance hit?

2011-08-08 Thread Igor Dovgiy
Hi all, I wonder is that a common case, or rather a very specific one; anyway, would deeply appreciate any help. :) For a long time we've been thinking about how to speed up our operations. Those are traversals: not very deep (level of depth is 2 at most), but rather complex ones (with

Re: [Neo4j] Multiple Server Instances: delayed performance hit?

2011-08-08 Thread Michael Hunger
Did you configure the heap sizes for both neo4j instances and also the memory-mapped settings? Otherwise a neo4j-instance will assume it is alone on a physical machine and tries to use the available physical RAM for itself. So if you run more than one instance on a machine you MUST configure

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] Multiple Server Instances: delayed performance hit?

2011-08-08 Thread Igor Dovgiy
No, I didn't change the heap sizes; tried to tinker a bit with neo4j memory settings, but the results - and the behavior - were still the same, so I stopped. Could you please give an example of how to configure memory settings for two Neo4J instances, if these instances are doing the same work?

Re: [Neo4j] Multiple Server Instances: delayed performance hit?

2011-08-08 Thread Michael Hunger
Igor, the configuration of the memory-mapped settings depends on your domain. You said you have about 4M nodes (up to 40M) what is the number of relationships, properties and strings/arrays. Normally you'd partition your 7G in half using 2G for heap and 1.5 G for memory mapped settings

Re: [Neo4j] Neo4j Disk Space Usage

2011-08-08 Thread Michael Hunger
Ahmad, could you please provide the different file sizes of the neo4j-directory, and if possible statistics about the counts of different property types and their min/max/average sizes (e.g. string, int, int[] etc.). Thanks so much Michael Am 08.08.2011 um 15:34 schrieb Ahmad Bakr: Hello

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] Neo4j Disk Space Usage

2011-08-08 Thread ahmad.bakr
I am using Neo4j REST API, so whenever i need to store data in Neo4j, i have to convert it to its JSON representation and send it to Neo4j. As i mentioned earlier, each node has three properties, the first one and the largest one holds a JSON representation of a HashTable, it's stored as string

Re: [Neo4j] Neo4j Disk Space Usage

2011-08-08 Thread Michael Hunger
Ahmad, could you also store the properties of the hashtable as properties of the node itself? How many entries are in such a hashtable ? You might configure the block-size of the string store to a different value to fit your typical hashtable-size better (which would affect the storage of the

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] is there a limit to how much data rest batch can take?

2011-08-08 Thread Boris Kizelshteyn
Wow, that is a great resource ;) I have just been logging my errors and I never looked here. Ok, so, I discovered a bug with my code which was removing a bounding box I needed for spatial indexing. So My bug, BUT, it brings to light an issue: It seems that the following error will cause a

Re: [Neo4j] update node properties via rest?

2011-08-08 Thread Boris Kizelshteyn
Is there a plan to fix this or will updates continue to be overwrites? Many thanks! On Thu, Jul 28, 2011 at 10:43 AM, Boris Kizelshteyn bo...@popcha.comwrote: It is a put right now and the semantics are clear I think, update means add stuff that isn't there and change stuff that's different.

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) {

Re: [Neo4j] Enhanced API rewrite

2011-08-08 Thread Dmitriy Shabanov
I ready to jump in too ;-) On Mon, Aug 8, 2011 at 3:37 PM, Niels Hoogeveen pd_aficion...@hotmail.comwrote: I can probably find the time for that. It would be fun working on these ideas in collaboration. I don't mind producing my usual brain-dumps and write some of the code, but quality will

[Neo4j] A big graph for test

2011-08-08 Thread Reza Ameri
Hi, How can I test my application that uses Neo4j? I can not find a huge sample graph to test my app with it. Is there any one that can help me??? Thank you all ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user

Re: [Neo4j] A big graph for test

2011-08-08 Thread Michael Hunger
Normally you just write a generator that creates nodes, relationships and properties that would resemble YOUR domain model. You can create a graph using that generator either with the normal java API or if it is really large (100M+ nodes and rels) then use the Batch-Inserter-API for that.

Re: [Neo4j] How to connect Neoclipse remotely

2011-08-08 Thread dhsieh
2. change the mode to remote Where is the place in Neoclips that I can set this remote mode? 4. open the dialog again, the Database Resource URI field is now enabled. Where does the Database Resource URI field shows up in Neoclipse? -- View this message in context:

Re: [Neo4j] A big graph for test

2011-08-08 Thread Marko Rodriguez
Hi, First, I analyze the statistics of my real-world graph data set. For example, determine the degree distribution -- if you want to get fancy, the degree distribution for each edge type/label. Then I plot that on a log/log-scale. Get the slope of that plot which gives me the alpha exponent.

Re: [Neo4j] Multiple threads sharing a transaction

2011-08-08 Thread Pieter Martin
Hi, I am doing the same for long running transactions. I suspend the transaction, storing the transaction in a conversation context and the resuming the it on subsequent request. The transaction commits when the conversation ends. This is working well. However the way I understand Neo4j

Re: [Neo4j] Neo4j Disk Space Usage

2011-08-08 Thread ahmad.bakr
Michael, Well, the average number of entries in a hashtable may be from 300-700 entries. i don't know if it's ok to store each key/value as properties in the node, you may tell me about that ? And here is the output of the 'ls -lh data/graph.db' total 2.3G -rw-r--r-- 1 webistrano webistrano

Re: [Neo4j] Easy to switch from Embedded to HighAvailability graph?

2011-08-08 Thread dhsieh
If your project plans to switch to HA cluster, you may want to take a look at the topic How to run webadmin for high availability neo4j custer? I posted. As of now, I am still waiting for someone from Neo4j dev team to respond to my reqeust: Hi Andreas, thanks for offering a sample application

Re: [Neo4j] Neo4j Disk Space Usage

2011-08-08 Thread Michael Hunger
Ahmad, besides the number of logical logs around (from keep_logical_logs=true), the largest store is really the string-store. You need to keep the logical logs only in a HA scenario or if you want to be able to take incremental backups (then there should be as many logs kept as the delta

Re: [Neo4j] finding top 10 shortest path

2011-08-08 Thread Mattias Persson
Hi Reza, glad to hear you're happy using Neo4j! By low weighted paths do you mean the Dijkstra algorithm, where each relationship is associated with a cost and you'd like to find the cheapest paths? In that case try GraphAlgoFactory#dijkstra 2011/8/8 Reza Ameri rz.am...@gmail.com Hi every

Re: [Neo4j] Enhanced API rewrite

2011-08-08 Thread Niels Hoogeveen
Hi Dmitri, I would very much appreciate it if you tried out Enhanced API and gave me feed back about your findings. Apart from traversals it is more or less feature complete, but it could use some thorough trying out. Niels Date: Mon, 8 Aug 2011 20:20:14 +0500 From: shaban...@gmail.com To:

[Neo4j] Neo4j embedded database with monitoring tool

2011-08-08 Thread noppanit
I'm building an application with embedded database, but also I'm trying to build a monitoring tool where it will shows me how many relationships, nodes and categorise those nodes to represent in some kind of charts using google chart. My question would be in embedded database, it only allows one

Re: [Neo4j] Easy to switch from Embedded to HighAvailability graph?

2011-08-08 Thread Andreas Kollegger
Sorry for the delay on writing up that material. I had a small window of lab time to work on such things, which quickly filled up with other tasks. It is on my backlog, which fits in with general operations support that I've spent some time working with here:

Re: [Neo4j] Neo4j embedded database with monitoring tool

2011-08-08 Thread Michael Hunger
This information (# of nodes and rels) is available using JMX which can be queried separately without accessing the graphdb. You can provide similar custom monitoring by adding JMX MBeans to your app. Then those can be viewed using jconsole or a similar tool. Cheers Michael Am 08.08.2011 um

Re: [Neo4j] Neo4j embedded database with monitoring tool

2011-08-08 Thread noppanit
Sorry, but I'm not familiar with JMX. Would that mean that I'm allowed to connect to the database and query something and return that in JSON so Google Chart can display that on the web which the front-end is still running and being used by user? So, the back-end can display real-time data? --

Re: [Neo4j] Neo4j embedded database with monitoring tool

2011-08-08 Thread Michael Hunger
JMX is a asynchronous monitoring mechanism employed by the jvm to visualize a plenthora of information. Just start jconsole from your local jdk installation, and point it to any running virtual machine. On the last mbeans tab you see the custom mbeans registered by that app. If you point it at

Re: [Neo4j] possible to query spatial indexes from gremlin?

2011-08-08 Thread Peter Neubauer
Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin

Re: [Neo4j] Neo4j embedded database with monitoring tool

2011-08-08 Thread noppanit
Thanks a lot! :) -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-embedded-database-with-monitoring-tool-tp3236863p3237064.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.

Re: [Neo4j] possible to query spatial indexes from gremlin?

2011-08-08 Thread Marko Rodriguez
Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for,

Re: [Neo4j] possible to query spatial indexes from gremlin?

2011-08-08 Thread Boris Kizelshteyn
Hey you guys are the best! I will try it this week and get back to you. Thanks! On Mon, Aug 8, 2011 at 7:07 PM, Marko Rodriguez okramma...@gmail.comwrote: Sitting in airports with long layovers make Marko crazy. On Aug 8, 2011 4:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote:

[Neo4j] Transactions using the REST API?

2011-08-08 Thread Nuo Yan
I've skimmed through the online resources and it appears that there's no documentations/articles mentioning how to get transactions support with the REST API. I found an earlier mailing list message asking about this but didn't see an answer. Is it actually possible to do multiple operations in a

Re: [Neo4j] Easy to switch from Embedded to HighAvailability graph?

2011-08-08 Thread dhsieh
Thanks Andreas for the update on this topic. Please keep us posted once you finish the wiki doc. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Easy-to-switch-from-Embedded-to-HighAvailability-graph-tp3233300p3237217.html Sent from the Neo4j

Re: [Neo4j] Transactions using the REST API?

2011-08-08 Thread Michael Hunger
Nuo, each request to the REST API is executed in its own (small) transaction. Having said that, there is support for batching REST operations which then will also be executed in a single large transaction. (See here: http://docs.neo4j.org/chunked/snapshot/rest-api-batch-ops.html). Michael

Re: [Neo4j] Transactions using the REST API?

2011-08-08 Thread Jim Webber
Hi Nuo, In the REST API every interaction is automatically executed within a transaction on the server side. If you need to complete multiple operations within the scope of a transaction you have a few options: 1. REST batch API: http://docs.neo4j.org/chunked/snapshot/rest-api-batch-ops.html

Re: [Neo4j] Transactions using the REST API?

2011-08-08 Thread Nuo Yan
Thanks to both of you Michael and Jim! That's exactly what I needed. Best, Nuo On Mon, Aug 8, 2011 at 4:43 PM, Jim Webber j...@neotechnology.com wrote: Hi Nuo, In the REST API every interaction is automatically executed within a transaction on the server side. If you need to complete

Re: [Neo4j] update node properties via rest?

2011-08-08 Thread Tatham Oddie
I don't see this as a bug. The implemented behaviour is congruent to what I expect from a REST interface. -- Tatham -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Boris Kizelshteyn Sent: Tuesday, 9 August 2011 1:04 AM To: Neo4j

[Neo4j] Defining relationships declaritavely or with annotations

2011-08-08 Thread etc1
Hi, Is it possible to define relationships using declarative configuration or annotations? The Getting Started guide illustrates how to do it programmatically, but I prefer to keep relationship mappings outside of the code, it will be easier to maintain. Thanks

Re: [Neo4j] Defining relationships declaritavely or with annotations

2011-08-08 Thread Michael Hunger
What does make you think it not being very mature? As one of the project leads I'm very interested in your thorough evaluation. There are other libraries that follow a similar approach (annotation based mapping), like jo4neo. Neo4j itself is about the core-database, higher level bindings or

Re: [Neo4j] Defining relationships declaritavely or with annotations

2011-08-08 Thread etc1
Mike, I'll take another look, did you guys redesign the website?... it looks different Anyway, since you're the expert I'll be sure to ping you in the future on this. Thanks again Raffi -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf

Re: [Neo4j] A big graph for test

2011-08-08 Thread Reza Ameri
Hi, Thank you for your answers, I can not generate it with the java API since, I want a big graph (more than 1 million nodes and rel.), So I have to search about Batch-Inserter-API and understand it or do something like what Marko said. I thought there is a generated graph for stress tests! Any

Re: [Neo4j] finding top 10 shortest path

2011-08-08 Thread Reza Ameri
Hi Mattias, Yeah, me too, Neo4j is really more awesome than I thought!!! The fact is that I could find the shortestPath in my weighted graph using astar algorithm from GrapgAlgoFactory and traversed it node by node. The case is to find next shortestPath after traversing current shortestPath, I