Re: [Neo4j] Heroku and Spatial Info
Hi Hesham, right now, only part of the full Java API is exposed to the REST API as a server plugin, it should be ok for the usual point operations, see https://github.com/neo4j/spatial/blob/master/features/start-and-stop.feature for an example. We are in the process of documenting Neo4j Spatial better for 0.7, it would be interesting to know what kind of operations you would like to have exposed and in what form? See https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesTest.java for a fluent Geo-API that could be a candidate to exposed via REST and something like the Groovy scripting a la Gremlin plugin, see http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html Would that make sense for you? For the hosting part, Michael, could we provide the spatial plugin as an addon? 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 - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Sat, Oct 8, 2011 at 1:21 AM, Hesham hesham.am...@gmail.com wrote: I'm pretty new to Neo4j and I have a rails application that will probably use Neo4j. Some of the items in the DB are currently location-tagged so I can perform spatial calculation. Can this be done with the Heroku add-on? Better yet, can some one point me to documentation/example of query records with spatial info? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Heroku-and-Spatial-Info-tp3404384p3404384.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
Re: [Neo4j] Heroku and Spatial Info
Thanks Peter, my use case is pretty simple, members can post articles that are location tagged, other members can retrieve articles that are geographically near to them. It seems with the spatial plugin, this is satisfied. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Heroku-and-Spatial-Info-tp3404384p3405023.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
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolar tco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.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
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioran chris.gio...@neotechnology.com wrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolar tco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.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 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Right, id is an implicit field ... works when not in transaction. If i remove that test, then I fail on the later index.get. As far as deleting the db, it's not in my test, but i removed the folder in y real code and manually before running the test. On 10/8/11 11:10 AM, Rick Bullotta wrote: If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioranchris.gio...@neotechnology.com wrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.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 ___ 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
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Actually you are right, seems like id is the only one that fails ... i really thought that was implicitly created, could it be possible than somehow it should be but doesn't when using the transaction manager ? On 10/8/11 11:41 AM, Thibaut Colar wrote: Right, id is an implicit field ... works when not in transaction. If i remove that test, then I fail on the later index.get. As far as deleting the db, it's not in my test, but i removed the folder in y real code and manually before running the test. On 10/8/11 11:10 AM, Rick Bullotta wrote: If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioranchris.gio...@neotechnology.com wrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.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 ___ 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 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Run test and development DBs at same time
Hi Is there a common pattern for test-driven development (or even just running unit tests) against a Neo DB without filling your development DB with test data? One solution I've thought might work is to run two Neo DBs, one in /path/to/my/sandboxed/dev/data and another in /path/to/my/sandboxed/test/data. However, looking at the conf files for neo, I can't see scope for that without some fiddling around -- am I missing something obvious? Cheers Steve ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Run test and development DBs at same time
Take a look at ImpermanentTestDatabse, available from the kernel-tests library. import org.neo4j.test.ImpermanentGraphDatabase; Maven dependency… dependency groupIdorg.neo4j/groupId artifactIdneo4j-kernel/artifactId version${neo4j.version}/version classifiertests/classifier /dependency Cheers, Andreas On Oct 8, 2011, at 1:19 PM, Steve Jalim wrote: Hi Is there a common pattern for test-driven development (or even just running unit tests) against a Neo DB without filling your development DB with test data? One solution I've thought might work is to run two Neo DBs, one in /path/to/my/sandboxed/dev/data and another in /path/to/my/sandboxed/test/data. However, looking at the conf files for neo, I can't see scope for that without some fiddling around -- am I missing something obvious? Cheers Steve ___ 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
Re: [Neo4j] Run test and development DBs at same time
You can use a import org.neo4j.test.ImpermanentGraphDatabase; which uses a temporary directory and cleans its contents before startup. It is contained in the neo4j-kernel-tests.jar. dependency groupIdorg.neo4j/groupId artifactIdneo4j-kernel/artifactId typetest-jar/type scopetest/scope /dependency HTH Michael Am 08.10.2011 um 22:19 schrieb Steve Jalim: Hi Is there a common pattern for test-driven development (or even just running unit tests) against a Neo DB without filling your development DB with test data? One solution I've thought might work is to run two Neo DBs, one in /path/to/my/sandboxed/dev/data and another in /path/to/my/sandboxed/test/data. However, looking at the conf files for neo, I can't see scope for that without some fiddling around -- am I missing something obvious? Cheers Steve ___ 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
Re: [Neo4j] trying to delete all reletionships but only got some
I believe you've found a bug in the per-node relationship cache when deleting relationships in the same iteration session as the lazy loading (grab size 100) of those relationships, and at the same time doing commits now and then in the middle of the iteration. At first sight it may be non-trivial to fix though. I've created a ticket for it: https://github.com/neo4j/community/issues/52 which points to a reduced version of your test case. Thank you for reporting it. Best, Mattias 2011/10/6 st.pa st...@web.de community 1.4.1. embedded Am 05.10.2011 15:54, schrieb Mattias Persson: Hi, which version of neo4j were you running this with? 2011/10/5 st.past...@web.de Hi. I tried to delete several million relationships of certain types from the reference node of an embedded graphdb, where there were several other relationshiptypes that were not to be affected. The Javadoc of Node#getRelationships(**RelationshipType...) says that it returns all relationships of the given type(s), so I expected that after one call I'd really get all. That was not the case. In my test-production-db i needed about 8 iterations, haven't recreated that in the test yet. But the test shows that not returning all desired relationships doesn't seem to depend on the total number of relationships as i thought in the beginning, if one runs the test with different numbers for insertions. Here's the log: 05.10.2011 13:36:16 test01 - create graph 05.10.2011 13:36:16 try to delete c:/_src/neo4j-test-remove-** relationships 05.10.2011 13:36:16 done deleting 05.10.2011 13:36:16 create graph db at c:/_src/neo4j-test-remove-** relationships 05.10.2011 13:36:22 retrieve root node and add another node 05.10.2011 13:36:22 prepare to cycle through relTypes 05.10.2011 13:36:22 loop to insert relationships by cycling through relTypes 05.10.2011 13:36:22 0 of 2097152 relationships inserted 05.10.2011 13:36:26 131072 of 2097152 relationships inserted 05.10.2011 13:36:28 262144 of 2097152 relationships inserted 05.10.2011 13:36:33 393216 of 2097152 relationships inserted 05.10.2011 13:36:35 524288 of 2097152 relationships inserted 05.10.2011 13:36:40 655360 of 2097152 relationships inserted 05.10.2011 13:36:43 786432 of 2097152 relationships inserted 05.10.2011 13:36:48 917504 of 2097152 relationships inserted 05.10.2011 13:36:53 1048576 of 2097152 relationships inserted 05.10.2011 13:36:58 1179648 of 2097152 relationships inserted 05.10.2011 13:37:02 1310720 of 2097152 relationships inserted 05.10.2011 13:37:08 1441792 of 2097152 relationships inserted 05.10.2011 13:37:12 1572864 of 2097152 relationships inserted 05.10.2011 13:37:20 1703936 of 2097152 relationships inserted 05.10.2011 13:37:25 1835008 of 2097152 relationships inserted 05.10.2011 13:37:33 1966080 of 2097152 relationships inserted 05.10.2011 13:37:37 2097152 of 2097152 relationships inserted 05.10.2011 13:37:37 finished inserting 2097152 relationships 05.10.2011 13:37:37 second part of test: deleting relationships 05.10.2011 13:37:37 get all relationships of the given type 05.10.2011 13:37:37 delete them all 05.10.2011 13:38:21 131072 relationships deleted 05.10.2011 13:38:39 262144 relationships deleted 05.10.2011 13:38:41 262153 relationships deleted in iteration 1 05.10.2011 13:38:41 get all relationships of the given type 05.10.2011 13:38:41 delete them all 05.10.2011 13:39:12 131072 relationships deleted 05.10.2011 13:39:22 262135 relationships deleted in iteration 2 05.10.2011 13:39:22 get all relationships of the given type 05.10.2011 13:39:22 delete them all 05.10.2011 13:39:22 0 relationships deleted in iteration 3 05.10.2011 13:39:22 could expect that one iteration is sufficient 05.10.2011 13:39:22 to get all relationships of the given types, 05.10.2011 13:39:22 so that it finished after the second iterations when deletions == 0 05.10.2011 13:39:22 if this line gets logged, then there were more than two iterations, which is bad And the testcase is attached as .java-file. Could please somebody take a look at it and the log and maybe find my mistake or confirm that this is strange behaviour. ciao, st.p. ___ 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 -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
Yes, Downloading, untar , adjust config and start via the scripts is the best way to run the server, this is what the QA tests do, too. On Saturday, October 8, 2011, doubleagent doubleagen...@gmail.com wrote: When I download the package form the main page and run bin/neo4j start, does that just wrap an embedded db, or is that intended to be an easy way to get going with an actual server? Would there be any drawback to just writing a script to pull that package, untar it, change some configuration parameters, and start/stop the server from there? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3405755.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 -- 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 - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
The implicit key is _id_ but that's an implementation detail and shouldn't be used to assert correctness of the index in unit tests. 2011/10/8 Thibaut Colar tco...@colar.net Actually you are right, seems like id is the only one that fails ... i really thought that was implicitly created, could it be possible than somehow it should be but doesn't when using the transaction manager ? On 10/8/11 11:41 AM, Thibaut Colar wrote: Right, id is an implicit field ... works when not in transaction. If i remove that test, then I fail on the later index.get. As far as deleting the db, it's not in my test, but i removed the folder in y real code and manually before running the test. On 10/8/11 11:10 AM, Rick Bullotta wrote: If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioran chris.gio...@neotechnology.com wrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.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 ___ 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 ___ Neo4j mailing list User@lists.neo4j.org
[Neo4j] Importing data from oracle to neo4j
I am very new to neo4j.So I don't know all of its features.I am reading its documentation to understand how it works. My project's requirement is to import the data from a data warehouse( which is an oracle db) once every month.We are thinking of implementing neo4j in our project which means we will have to read the data from oracle db and put it into neo4j. There will be around 1 lakh rows(10^5) to be fetched from oracle db.What is the fast/efficient way of doing it? Thanks! -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Importing-data-from-oracle-to-neo4j-tp3406024p3406024.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
Re: [Neo4j] Importing data from oracle to neo4j
What is your use-case for importing the DWH data? How are you going to model the data of the DWH in neo4j. How does the domain-model look like? BI data is normally denormalized. So for creating a good graph structure it would be sensible to normalize it during the import. 10k rows is not that much. You can import them using the normal neo4j transactional facilities in a few seconds. For building up your graph model you probably want to index your data or create category nodes to access certain parts of your domain model. Peter wrote a tool to import relational data into neo4j but that was normalized data where each table was represented by a certain type of node in the graph and foreign key relationships were converted to graph relationships. I don't know if that also handled m:n connection tables efficiently by converting them to relationships too. HTH Michael Am 08.10.2011 um 23:05 schrieb jiteshks: I am very new to neo4j.So I don't know all of its features.I am reading its documentation to understand how it works. My project's requirement is to import the data from a data warehouse( which is an oracle db) once every month.We are thinking of implementing neo4j in our project which means we will have to read the data from oracle db and put it into neo4j. There will be around 1 lakh rows(10^5) to be fetched from oracle db.What is the fast/efficient way of doing it? Thanks! -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Importing-data-from-oracle-to-neo4j-tp3406024p3406024.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
Re: [Neo4j] Run test and development DBs at same time
On Sat, Oct 8, 2011 at 16:30, Michael Hunger michael.hun...@neotechnology.com wrote: You can use a import org.neo4j.test.ImpermanentGraphDatabase; Do you know if it could be possible to use this from the REST server? -- Javier de la Rosa http://versae.es ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Run test and development DBs at same time
For development using the REST interface, I usually run two databases on separate ports or hosts. On the development/testing database, I use the remote clean extension found at https://github.com/jexp/neo4j-clean-remote-db-addon to reset the database before running my automated tests. -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Run-test-and-development-DBs-at-same-time-tp3405951p3406525.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] Different instances in Neo4j REST db
Hello, Does Neo4J REST db allow us to create multiple different graphs, e.g. one graph is for a set of data A and another for a set of data B? My question is about the similar feature in the relational db where we can create multiple db instances. If Neo4J does how can I do it? Thanks, ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
You are right, was just using that in this (poor) unit test I made quickly late last week, it's not used in the real code. So the unit test does work and does not have the issue I have in the real and much more complex code. I guess I'll try to bring more of it in this unit test until i break it too. One of the thing we use, is the neo4j events mechanism(to sync data to another system), so i wonder if maybe using that in the context of transactions might cause the issue, or maybe some other sort of threading issue(what it looked like when i was debugging). Anyway will try to see if i can give you a failing test and/or better info tomorrow or Monday. Thanks On 10/8/11 1:51 PM, Mattias Persson wrote: The implicit key is _id_ but that's an implementation detail and shouldn't be used to assert correctness of the index in unit tests. 2011/10/8 Thibaut Colartco...@colar.net Actually you are right, seems like id is the only one that fails ... i really thought that was implicitly created, could it be possible than somehow it should be but doesn't when using the transaction manager ? On 10/8/11 11:41 AM, Thibaut Colar wrote: Right, id is an implicit field ... works when not in transaction. If i remove that test, then I fail on the later index.get. As far as deleting the db, it's not in my test, but i removed the folder in y real code and manually before running the test. On 10/8/11 11:10 AM, Rick Bullotta wrote: If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioran chris.gio...@neotechnology.comwrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.netwrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list