Re: [Neo4j] how many relationships?
thanks for that, I only had embedded-examples changed, but it looks like I was doing the git pull wrong, that is I was using `git fetch from upstream` instead of `git pull`... I actually never had to use this before :) I was only ever committing with git (used svn/mercurial before though) For some reason I remembered (from a friend) that fetch was the way to pull. So I did the git pull and it worked (the counting worked as expected too, hooray!). Thus my bad, soz :) I am glad I didn't have to wait 3 days, I even looked into Organizations on github as an alternative way of getting limited (read-only) access to the committers' repo. Now I can continue ... xD On Fri, Jul 22, 2011 at 7:51 AM, Michael Hunger michael.hun...@neotechnology.com wrote: github has no separate repo for the readonly url most probably your git pull failed due to local changes git stash them or use git pull --rebase Michael mobile mail please excuse brevity and typos Am 22.07.2011 um 04:32 schrieb cyuczi eekc cyuczie...@gmail.com: Hey, btw, the issue was fixed: https://trac.neo4j.org/ticket/356#comment:1 However, github didn't yet sync the git-readonly (ie. git:// github.com/neo4j/community.git ) and looks like I am 3-4 days back, since my HEAD is at: Minor fix to the cypher/identifiers section. https://github.com/neo4j/community/commit/dc260c269ae4e09362ada181d7b9a42e6c86560e nawroth https://github.com/nawroth (author) 3 days ago as seen here: https://github.com/neo4j/community/commits/master/ I guess that is why you didn't say anything yet (because me fetching from git would not be able to get the fix yet, 3 more days geezuz xD) Anyway, I'm only saying this just in case you were not aware this was fixed (apparently by someone else) and you were still working on it. Sorry, I already had made a ticket about this before you last replied. Thank you all, can't wait to test :) On Thu, Jul 21, 2011 at 12:13 PM, Michael Hunger michael.hun...@neotechnology.com wrote: We're already on it. Looking through the causes for that issue and will keep you and everyone else informed. Michael Am 21.07.2011 um 06:52 schrieb cyuczi eekc: about this, should I create an issue? ___ 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] how many relationships?
you would have never gotten the update git pull does a fetch and merge please read a quick intro to git there are many on the internets mobile mail please excuse brevity and typos Am 22.07.2011 um 08:10 schrieb cyuczi eekc cyuczie...@gmail.com: thanks for that, I only had embedded-examples changed, but it looks like I was doing the git pull wrong, that is I was using `git fetch from upstream` instead of `git pull`... I actually never had to use this before :) I was only ever committing with git (used svn/mercurial before though) For some reason I remembered (from a friend) that fetch was the way to pull. So I did the git pull and it worked (the counting worked as expected too, hooray!). Thus my bad, soz :) I am glad I didn't have to wait 3 days, I even looked into Organizations on github as an alternative way of getting limited (read-only) access to the committers' repo. Now I can continue ... xD On Fri, Jul 22, 2011 at 7:51 AM, Michael Hunger michael.hun...@neotechnology.com wrote: github has no separate repo for the readonly url most probably your git pull failed due to local changes git stash them or use git pull --rebase Michael mobile mail please excuse brevity and typos Am 22.07.2011 um 04:32 schrieb cyuczi eekc cyuczie...@gmail.com: Hey, btw, the issue was fixed: https://trac.neo4j.org/ticket/356#comment:1 However, github didn't yet sync the git-readonly (ie. git:// github.com/neo4j/community.git ) and looks like I am 3-4 days back, since my HEAD is at: Minor fix to the cypher/identifiers section. https://github.com/neo4j/community/commit/dc260c269ae4e09362ada181d7b9a42e6c86560e nawroth https://github.com/nawroth (author) 3 days ago as seen here: https://github.com/neo4j/community/commits/master/ I guess that is why you didn't say anything yet (because me fetching from git would not be able to get the fix yet, 3 more days geezuz xD) Anyway, I'm only saying this just in case you were not aware this was fixed (apparently by someone else) and you were still working on it. Sorry, I already had made a ticket about this before you last replied. Thank you all, can't wait to test :) On Thu, Jul 21, 2011 at 12:13 PM, Michael Hunger michael.hun...@neotechnology.com wrote: We're already on it. Looking through the causes for that issue and will keep you and everyone else informed. Michael Am 21.07.2011 um 06:52 schrieb cyuczi eekc: about this, should I create an issue? ___ 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
Re: [Neo4j] How often are Spatial snapshots published?
Nolan, saftest is to build it yourself from GITHub, I will check the deployment. Is that ok for now? /peter On Fri, Jul 22, 2011 at 3:57 AM, Nolan Darilek no...@thewordnerd.info wrote: I'm looking at the Spatial sources from Git, and am seeing lots of versions of SpatialTopologyUtils.findClosestEdges that don't appear to be in the snapshot I'm downloading. For instance, public static ArrayListPointResult findClosestEdges(Point point, Layer layer) { doesn't appear to be in the snapshot build I have--that or my local cache is borken. Are these snapshots rebuilt regularly? Thanks. ___ 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] How often are Spatial snapshots published?
Hi! The deployment seems to be broken at the moment, I'll look into that ASAP. /anders 2011-07-22 09:28, Peter Neubauer skrev: Nolan, saftest is to build it yourself from GITHub, I will check the deployment. Is that ok for now? /peter On Fri, Jul 22, 2011 at 3:57 AM, Nolan Darilekno...@thewordnerd.info wrote: I'm looking at the Spatial sources from Git, and am seeing lots of versions of SpatialTopologyUtils.findClosestEdges that don't appear to be in the snapshot I'm downloading. For instance, public static ArrayListPointResult findClosestEdges(Point point, Layer layer) { doesn't appear to be in the snapshot build I have--that or my local cache is borken. Are these snapshots rebuilt regularly? Thanks. ___ 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] How often are Spatial snapshots published?
Interesting that if you look at the github 'blame' for that file (see https://github.com/neo4j/neo4j-spatial/blame/master/src/main/java/org/neo4j/gis/spatial/SpatialTopologyUtils.java), you find that all the findClosestEdges methods where added in October 2010. So if Nolan has a version older than that, then something weird is going on. He must have the very first version from September 2010, which is not compatible with any recent Neo4, Geotools or uDig. When I look at m2.neo4j.org I can see that the latest 0.6-SNAPSHOT is from May. So we do have a problem, but not one that takes us back to last September. Nolan, perhaps your pom.xml refers to an older neo4j-spatial? You should use 0.6-SNAPSHOT. And we will change that again soon (to 0.7) since we are making changes to the geoprocessing and indexing. On Fri, Jul 22, 2011 at 10:04 AM, Anders Nawroth and...@neotechnology.comwrote: Hi! The deployment seems to be broken at the moment, I'll look into that ASAP. /anders 2011-07-22 09:28, Peter Neubauer skrev: Nolan, saftest is to build it yourself from GITHub, I will check the deployment. Is that ok for now? /peter On Fri, Jul 22, 2011 at 3:57 AM, Nolan Darilekno...@thewordnerd.info wrote: I'm looking at the Spatial sources from Git, and am seeing lots of versions of SpatialTopologyUtils.findClosestEdges that don't appear to be in the snapshot I'm downloading. For instance, public static ArrayListPointResult findClosestEdges(Point point, Layer layer) { doesn't appear to be in the snapshot build I have--that or my local cache is borken. Are these snapshots rebuilt regularly? Thanks. ___ 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] Using neo4j spatial in non maven projects
Hi, I received a message on github asking how to setup the dependencies for using neo4j-spatial in a non-maven project, and I replied there, but thought this should also be posted to the neo4j mailing list in case it is of interest to others. Even if you don't use maven for your own project, you could still use maven to grab all the dependencies once and then manually add them to your project. For example, in neo4j-spatial/pom.xml, we have the maven target dependency:copy-dependencies that will copy all the jars into target/dependency. Then you can copy those to your application. git clone git://github.com/neo4j/neo4j-spatial.git cd neo4j-spatial mvn dependency:copy-dependencies cp -a target/dependency/* ~/my-app/lib/ You also started to describe a little about your applications requirements. Do you want advice on the graph model? We support importing OSM, but it sounds like you have a modified OSM model of your own. Either just import your data as you see fit (and write a GeometryEncoder to map to spatial), or use our OSM importer and add your own extra graph constructs to the OSM graph (eg. add direct relationships between some nodes specific for your routing algorithms), then you have the standard OSM (for map rendering, etc.) and your routing graph combined. We have been thinking of doing that anyway for routing, since OSM 'out the box' is not ideal for routing. Regards, Craig -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Using-neo4j-spatial-in-non-maven-projects-tp3190930p3190930.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] How to download neo4j 1.3 [for using jo4Neo]
Hi everybody, I'd like to download the version 1.3 of neo4j. Where could I find the URL to download it? By the way, does someone know jo4neo? Because I'm trying to use jo4neo and neo4j-server but without success. Maybe someone have a great advise for me to use the both together. Many thanks, Bat -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191002.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] How to download neo4j 1.3 [for using jo4Neo]
Hi there, I don't think there is much support for jo4neo around, as it is superseded by Spring Data Graph. Could you please try that instead? /peter Sent from my phone. On Jul 22, 2011 12:12 PM, BatiG batistutagabrielf...@gmail.com wrote: Hi everybody, I'd like to download the version 1.3 of neo4j. Where could I find the URL to download it? By the way, does someone know jo4neo? Because I'm trying to use jo4neo and neo4j-server but without success. Maybe someone have a great advise for me to use the both together. Many thanks, Bat -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191002.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] How to download neo4j 1.3 [for using jo4Neo]
You mean that Jo4neo is dead and It has been replaced by Spring Data Graph? Is Sping Data graph stable? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191081.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] Best way to find all the relationships between nodes which in a list
Hi there, Cypher does not let you address the ID directly (yet) in the where parts. Michael, Andres, WDYT of supporting it? 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 Wed, Jul 20, 2011 at 3:03 AM, Jingex gulei...@zju.edu.cn wrote: Hi all, In a case we have several people, name:Mike,Jack,John, as their node id are:1,2,3 We want to find out all the relationships between them. Use Cypher, the query like this: start n = (1,2,3) mathch (n)-[r]-(people) where people.name = Mike or people.name = Jack or people.name = John return n.name,r.type,people.name So, is it possible to use node ID as filter in the WHERE part, just as START part? Such as where people.id = (1,2,3)? Or return all the (people) related with (n), than filter the ID in return results? IN and BETWEEN are usefull operators, especially when you have a long list. As far as I know, now I have to use a lot of or to find out all the possible? Thanks Alfred -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Best-way-to-find-all-the-relationships-between-nodes-which-in-a-list-tp3184169p3184169.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] Number of properties on a PropertyContainer
Last night while working on some enhancements on the Neo4J API, I set up a method to lookup the name of a relationship, to facilitate the creation of associated nodes. The method I use, is to create a node (which can be found through the reference node) and on this node create a property for each relationship name. The value of the property is the node id of the associated node. My question is if this scales properly. It is unlikely any Neo4J store will contain millions of relationship types, but it is conceivable that there may be over ten thousand relationship types in a store. Will this solution still work under such conditions, or is it better to create a relationship for each relationship type and store the node id of the associated node in the relation. Niels ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Number of properties on a PropertyContainer
That's a perfect use case for a super trivial Lucene index, no? Would seem to be a much easier solution with much faster lookup...and built into Neo4J. From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On Behalf Of Niels Hoogeveen [pd_aficion...@hotmail.com] Sent: Friday, July 22, 2011 8:21 AM To: user@lists.neo4j.org Subject: [Neo4j] Number of properties on a PropertyContainer Last night while working on some enhancements on the Neo4J API, I set up a method to lookup the name of a relationship, to facilitate the creation of associated nodes. The method I use, is to create a node (which can be found through the reference node) and on this node create a property for each relationship name. The value of the property is the node id of the associated node. My question is if this scales properly. It is unlikely any Neo4J store will contain millions of relationship types, but it is conceivable that there may be over ten thousand relationship types in a store. Will this solution still work under such conditions, or is it better to create a relationship for each relationship type and store the node id of the associated node in the relation. Niels ___ 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] Number of properties on a PropertyContainer
This certainly can be done with a Lucene lookup, I am just not so sure if the lookup is actually faster. From: rick.bullo...@thingworx.com To: user@lists.neo4j.org Date: Fri, 22 Jul 2011 05:41:09 -0700 Subject: Re: [Neo4j] Number of properties on a PropertyContainer That's a perfect use case for a super trivial Lucene index, no? Would seem to be a much easier solution with much faster lookup...and built into Neo4J. From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On Behalf Of Niels Hoogeveen [pd_aficion...@hotmail.com] Sent: Friday, July 22, 2011 8:21 AM To: user@lists.neo4j.org Subject: [Neo4j] Number of properties on a PropertyContainer Last night while working on some enhancements on the Neo4J API, I set up a method to lookup the name of a relationship, to facilitate the creation of associated nodes. The method I use, is to create a node (which can be found through the reference node) and on this node create a property for each relationship name. The value of the property is the node id of the associated node. My question is if this scales properly. It is unlikely any Neo4J store will contain millions of relationship types, but it is conceivable that there may be over ten thousand relationship types in a store. Will this solution still work under such conditions, or is it better to create a relationship for each relationship type and store the node id of the associated node in the relation. Niels ___ 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] How to download neo4j 1.3 [for using jo4Neo]
Do you know an another framework that makes POJO as jo4neo or Spring Data Graph? I'd like to test everything before choosing. Thanks -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191250.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] How to download neo4j 1.3 [for using jo4Neo]
Hi there, you could also try https://github.com/tinkerpop/frames/wiki which supports Neo4j. Otherwise, there is a number of non-java bindings for JRuby, Python, Scala and others. 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 Fri, Jul 22, 2011 at 2:46 PM, BatiG batistutagabrielf...@gmail.com wrote: Do you know an another framework that makes POJO as jo4neo or Spring Data Graph? I'd like to test everything before choosing. Thanks -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191250.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] Number of properties on a PropertyContainer
Loading one property on a node results in the entire property chain being loaded, i.e. if you have numeric values all properties will be loaded on the first getProperty request on that node... after that it's a HashMap lookup from the key to the value. So the first getProperty (if that node hasn't been loaded yet or it has been loaded but flushed out of the cache to make room for other more frequently used nodes) will be slow (a sequential scan through all properties), all other will be very fast. 2011/7/22 Niels Hoogeveen pd_aficion...@hotmail.com This certainly can be done with a Lucene lookup, I am just not so sure if the lookup is actually faster. From: rick.bullo...@thingworx.com To: user@lists.neo4j.org Date: Fri, 22 Jul 2011 05:41:09 -0700 Subject: Re: [Neo4j] Number of properties on a PropertyContainer That's a perfect use case for a super trivial Lucene index, no? Would seem to be a much easier solution with much faster lookup...and built into Neo4J. From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On Behalf Of Niels Hoogeveen [pd_aficion...@hotmail.com] Sent: Friday, July 22, 2011 8:21 AM To: user@lists.neo4j.org Subject: [Neo4j] Number of properties on a PropertyContainer Last night while working on some enhancements on the Neo4J API, I set up a method to lookup the name of a relationship, to facilitate the creation of associated nodes. The method I use, is to create a node (which can be found through the reference node) and on this node create a property for each relationship name. The value of the property is the node id of the associated node. My question is if this scales properly. It is unlikely any Neo4J store will contain millions of relationship types, but it is conceivable that there may be over ten thousand relationship types in a store. Will this solution still work under such conditions, or is it better to create a relationship for each relationship type and store the node id of the associated node in the relation. Niels ___ 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 -- 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
[Neo4j] neo4j.py install problems
I'm getting error after error trying to get neo4j.py working. Right now I'm stuck at a problem that appears to be the same as this ticket https://trac.neo4j.org/ticket/275 https://trac.neo4j.org/ticket/275 . But it doesn't actually say how to go about solving it. I don't actually have to go back to an older version of Neo4j do I? *Python:* import os, sys, traceback from neo4j import * java_home = os.getenv(JAVA_HOME) #I registered JAVA_HOME but python wouldn't pick it up so I added it manually if(java_home == None): os.environ[JAVA_HOME] = /usr/lib/jvm/java-6-openjdk graphdb = GraphDatabase(/srv/neo4j/databases/graph.db, classpath=[/usr/share/java/neo4j-kernel.jar], log=True) *Error:* [Fri Jul 22 20:19:12 2011] [info] [client 10.211.55.2] mod_wsgi (pid=1885, process='', application='directory.private.com|'): Loading WSGI script '/var/www/production/directory.private.com/start.wsgi'. [Fri Jul 22 20:19:12 2011] [error] /var/www/production/directory.private.com/lib/dispatch/core/wsgi.py:53: SyntaxWarning: import * only allowed at module level [Fri Jul 22 20:19:12 2011] [error] def __call__(self, environ, start_response): [Fri Jul 22 20:19:12 2011] [error] /usr/lib/pymodules/python2.6/jpype/_pykeywords.py:18: DeprecationWarning: the sets module is deprecated [Fri Jul 22 20:19:12 2011] [error] import sets [Fri Jul 22 20:19:12 2011] [info] mod_wsgi (pid=1899): Initializing Python. [Fri Jul 22 20:19:12 2011] [info] mod_wsgi (pid=1899): Attach interpreter ''. [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] mod_wsgi (pid=1885): Exception occurred processing WSGI script '/var/www/production/directory.private.com/start.wsgi'. [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] Traceback (most recent call last): [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] File /var/www/production/directory.private.com/lib/dispatch/core/wsgi.py, line 75, in __call__ [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] graphdb = GraphDatabase(/srv/neo4j/databases/graph.db, classpath=[/usr/share/java/neo4j-kernel.jar], log=True) [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] File /usr/local/lib/python2.6/dist-packages/Neo4j.py-0.1_SNAPSHOT-py2.6.egg/neo4j/__init__.py, line 522, in __new__ [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] neo = core.load_neo(resource_uri, params) [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] File /usr/local/lib/python2.6/dist-packages/Neo4j.py-0.1_SNAPSHOT-py2.6.egg/neo4j/_core.py, line 332, in load_neo [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] return load_neo(resource_uri, parameters) [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] File /usr/local/lib/python2.6/dist-packages/Neo4j.py-0.1_SNAPSHOT-py2.6.egg/neo4j/_core.py, line 225, in load_neo [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] return GraphDatabase(resource_uri, settings, config, log) [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] File /usr/local/lib/python2.6/dist-packages/Neo4j.py-0.1_SNAPSHOT-py2.6.egg/neo4j/_core.py, line 230, in __init__ [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] neo = backend.load_neo(resource_uri, settings) [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] File /usr/local/lib/python2.6/dist-packages/Neo4j.py-0.1_SNAPSHOT-py2.6.egg/neo4j/_backend/__init__.py, line 74, in load_neo [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] return impl(resource_uri, implementation.make_map(settings)) [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] File /usr/lib/pymodules/python2.6/jpype/_jclass.py, line 79, in _javaInit [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] self.__javaobject__ = self.__class__.__javaclass__.newClassInstance(*args) [Fri Jul 22 20:19:12 2011] [error] [client 10.211.55.2] java.lang.RuntimeExceptionPyRaisable: org.neo4j.kernel.impl.transaction.TransactionFailureException: Could not create data source [nioneodb], see nested exception for cause of error -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/neo4j-py-install-problems-tp3191386p3191386.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] How to download neo4j 1.3 [for using jo4Neo]
Spring Graph Database is not really what I want. And It could be very hard to deploy that on BlazeDS [ http://opensource.adobe.com/wiki/display/blazeds/BlazeDS http://opensource.adobe.com/wiki/display/blazeds/BlazeDS ]. Do you know the developpers of jo4neo? Is it possible to help them to upgrade jo4neo? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191573.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] How to download neo4j 1.3 [for using jo4Neo]
probably I can look into it what are the your issues with spring data graph? Michael mobile mail please excuse brevity and typos Am 22.07.2011 um 16:38 schrieb BatiG batistutagabrielf...@gmail.com: Spring Graph Database is not really what I want. And It could be very hard to deploy that on BlazeDS [ http://opensource.adobe.com/wiki/display/blazeds/BlazeDS http://opensource.adobe.com/wiki/display/blazeds/BlazeDS ]. Do you know the developpers of jo4neo? Is it possible to help them to upgrade jo4neo? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191573.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] How to download neo4j 1.3 [for using jo4Neo]
You could look into the code of jo4neo? It could be very usefull and powerfull for everybody!! I mean, with jo4neo, you can create very easly withtout configuration a Graph Database and we could have the web administration. With Spring, you need to configure a lof of files and for myself, I've already a web application running on my server. So it means that, if I use Spring, the both applications shall communicate together... It could be very difficult to deploy that... However, with jo4neo, I can include the code using jo4neo as a library (.jar) in my running web application : very easy! Thanks -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191611.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] How often are Spatial snapshots published?
Not sure what's up, but I went ahead and built from Git. All's well now. On 07/22/2011 02:28 AM, Peter Neubauer wrote: Nolan, saftest is to build it yourself from GITHub, I will check the deployment. Is that ok for now? /peter On Fri, Jul 22, 2011 at 3:57 AM, Nolan Darilekno...@thewordnerd.info wrote: I'm looking at the Spatial sources from Git, and am seeing lots of versions of SpatialTopologyUtils.findClosestEdges that don't appear to be in the snapshot I'm downloading. For instance, public static ArrayListPointResult findClosestEdges(Point point, Layer layer) { doesn't appear to be in the snapshot build I have--that or my local cache is borken. Are these snapshots rebuilt regularly? Thanks. ___ 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] How to download neo4j 1.3 [for using jo4Neo]
You can add Spring Data Graph to any existing Webapp as well. Just saying. I don't think it is difficult to deploy that. Just add SDG to your domain layer. Anyway, whatever approach you use for Object-Graph-Mapping against a remote Server you should be aware that the performance limitations of the REST API will affect the very fine grained Mapping Operations. By default jo4neo only works with an embedded Neo4j database. We'll see how it works out remotely. Cheers Michael Am 22.07.2011 um 16:55 schrieb BatiG: You could look into the code of jo4neo? It could be very usefull and powerfull for everybody!! I mean, with jo4neo, you can create very easly withtout configuration a Graph Database and we could have the web administration. With Spring, you need to configure a lof of files and for myself, I've already a web application running on my server. So it means that, if I use Spring, the both applications shall communicate together... It could be very difficult to deploy that... However, with jo4neo, I can include the code using jo4neo as a library (.jar) in my running web application : very easy! Thanks -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3191611.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] More spatial questions
OK, thanks for this. Unfortunately my project is getting less attention now than it ever has, but I finally sat down and reworked my architecture. Instead of working with Neo4J Nodes, I've reworked my library to use SpatialDatabaseRecord and am now having a bit more success. I have three more query types to implement, and I'm not immediately seeing how to do this using the OSM API. I'm not sure if I need to drop to the lower-level JTS searches for these, so any guidance would be appreciated. Note that, in all that follows, node means OSM node, not Neo4J node: def nearestWay(lat:Double, lon:Double, allowedTypes:Option[List[String]] = None) = { Finds the nearest way to a given lat, lon. The list of allowed types lets me filter out power lines, footways, etc. by specifying values for the highway= tag. def nearestNodeWithWay(lat:Double, lon:Double, allowedTypes:Option[List[String]]) = { Finds the nearest node on any way. def waysForNode(n:Node) = { Lists the ways on which a given node is found. OSMDataset lets me do the opposite and returns the nodes for a way, but I don't immediately see a way to do this. Thanks. On 06/19/2011 04:47 PM, Craig Taverner wrote: Hi Nolan, I think I can answer a few of your questions. Firstly, some background. The graph model of the OSM data is based largely on the XML formated OSM documents, and there you will find 'nodes', 'ways', 'relations' and 'tags' each as their own xml-tag, and as a consequence each will also have their own neo4j-node in the graph. Another point is that the geometry can be based on one or more nodes or ways, and so we always create another node for the geometry, and link it to the osm-node, way or relation that represents that geometry. What all this boils down to is that you cannot find the tags on the geometry node itself. You cannot even find the location on that node. If you want to use the graph model in a direct way, as you have been trying, you really do need to know how the OSM data is modeled. For example, for a LineString geometry, you would need to traverse from the geometry node to the way node and finally to the tags node (to get the tags). To get to the locations is even more complex. Rather than do that, I would suggest that you work with the OSM API we provided with the OSMLayer, OSMDataset and OSMGeometryEncoder classes. Then you do not need to know the graph model at all. For example, OSMDataset has a method for getting a Way object from a node, and the returned object can be queried for its nodes, geometry, etc. Currently we provide methods for returning neo4j-nodes as well as objects that make spatial sense. One minor issue here is the ambiguity inherent in the fact that both neo4j and OSM make use of the term 'node', but for different things. We have various solutions to this, sometimes replacing 'node' with 'point' and sometimes prefixing with 'osm'. The unit tests in TestsForDocs includes some tests for the OSM API. My first goal is to find the nearest OSM node to a given lat, lon. My attempts seem to be made of fail thus far, however. Here's my code: Most of the OSM dataset is converted into LineStrings, and what you really want to do is find the closest vertex of the closest LineString. We have a utility function 'findClosestEdges' in the SpatialTopologyUtils class for that. The unit tests in TestSpatialUtils, and the testSnapping() method in particular, show use of this. My thinking is that nodes should be represented as points, so I can't see why this fails. When I run this in a REPL, I do get a node back. So far so good. Next, I want to get the node's tags. So I run: The spatial search will return 'geometries', which are spatial objects. In neo4j-spatial every geometry is represented by a unique node, but it is not required that that node contain coordinates or tags. That is up to the GeometryEncoder. In the case of the OSM model, this information is elsewhere, because of the nature of the OSM graph, which is a highly interconnected network of points, most of which do not represent Point geometries, but are part of much more complex geometries (streets, regions, buildings, etc.). n.getSingleRelationship(OSMRelation.TAGS, Direction.INCOMING) The geometry node is not connected directly to the tags node. You need two steps to get there. But again, rather than figure out the graph yourself, use the API. In this case, instead of getting the geometry node from the SpatialDatabaseRecord, rather just get the properties using getPropertyNames and getProperty(String). This API works the same on all kinds of spatial data, and in the case of OSM data will return the TAGS, since those are interpreted as attributes of the geometries. n.getSingleRelationship(OSMRelationship.GEOM, Direction.INCOMING).getOtherNode(n).getPropertyKeys I see what appears to be a series of tags (oneway, name, etc.) Why are these being returned for OSMRelation.GEOM
[Neo4j] Neo4j server - Gremlin plugin - line break in script
Hi, I am using neo4j server 1.4. I want to send a gremin script (which is ok with script with one line). I am wondering if I can send script with line break in it. I currently have /message: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value at [Source: java.io.StringReader@fde4e6; line: 1, column: 21], exception: org.neo4j.server.rest.repr.BadInputException: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value at [Source: java.io.StringReader@fde4e6; line: 1, column: 21], stacktrace: [(36)/ -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-server-Gremlin-plugin-line-break-in-script-tp3191845p3191845.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] Neo4j server - Gremlin plugin - line break in script
Guillaume, Are you sending it via the rest plugin? In docs.neo4j.org the sample graph example is using multiple lines, separated by semicolon. /peter Sent from my phone. On Jul 22, 2011 6:17 PM, Guillaume ALLEE guillaume.al...@capgemini.com wrote: Hi, I am using neo4j server 1.4. I want to send a gremin script (which is ok with script with one line). I am wondering if I can send script with line break in it. I currently have /message: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value at [Source: java.io.StringReader@fde4e6; line: 1, column: 21], exception: org.neo4j.server.rest.repr.BadInputException: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value at [Source: java.io.StringReader@fde4e6; line: 1, column: 21], stacktrace: [(36)/ -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-server-Gremlin-plugin-line-break-in-script-tp3191845p3191845.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] NoSuchElementException
2011/7/18 sulabh choudhury sula...@gmail.com Though when I think about it, I guess I would still have the issue of getting duplicate nodes. Say I have 1 million node1, node2, rel entries to put in Neo, What you are suggesting is that I do a Batch of all sets of node1,node2 first and then flush and go about inserting all rels in the next batch insert Since I can have duplicate nodes in the 1million entries, how do I make sure that all the nodes within a Batch insert are unique? Do I maintain another index within a batch insert (say a hahmap) which would have entries of node and its indices, or is there a better way ? If the dataset is small enough you could have it in a HashMap, but otherwise you could run that set through some pre-processing before inserting which removes duplicates... I think that would be the best alternative. On Mon, Jul 18, 2011 at 11:39 AM, sulabh choudhury sula...@gmail.comwrote: Makes sense. Will try that. Thanks. On Fri, Jul 15, 2011 at 2:59 PM, sulabh choudhury sula...@gmail.comwrote: Well while inserting the nodes I keep a check batchInserter.nodeExists(node1) so I would guess a node would not be duplicated. Otherwise during a traversal I guess duplicate nodes. IIs there a way I can look into the BtachInsert data before I flush so that I can make sure no duplicate data has been inserted ? On Sat, Jun 25, 2011 at 10:49 AM, sulabh choudhury sula...@gmail.comwrote: Thank you Jim. I will wait for 1.5 and hope it resolves the issue :) On Fri, Jun 24, 2011 at 7:11 PM, sulabh choudhury sula...@gmail.comwrote: Hi, I just downloaded the neo4j-community-1.4.M04. I stumbled into the java.util.NoSuchElementException: More than one element in org.neo4j.index.impl.lucene.LuceneIndex$1@396cbd97. First element is 'Node[3]' and the second element is 'Node[2]' at org.neo4j.helpers.collection.IteratorUtil.singleOrNull(IteratorUtil.java:114) ~[working_graphGen.jar:na] at org.neo4j.index.impl.lucene.IdToEntityIterator.getSingle(IdToEntityIterator.java:88) ~[working_graphGen.jar:na] at org.neo4j.index.impl.lucene.IdToEntityIterator.getSingle(IdToEntityIterator.java:32) ~[working_graphGen.jar:na] I looked up and found that this is a bug and has been fixed. I was wondering if the fix has been incorporated in the latest Milestone or not? -- -- Thanks and Regards, Sulabh Choudhury -- -- Thanks and Regards, Sulabh Choudhury -- 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
[Neo4j] help for Traverser
Hi, I am trying to create a traverser and I am stuck. So my code takes in a startNode, 2 relationshiptypes and 2 directions. It will starting from startNode go to nodes with rel1 in dir1 and from all those nodes to rel2,dir2. The code below (in SCALA) works fine and I get the expected nodes. The issue is, along with the nodes I also need to get properties from the relationships. So all my relationshiptypes have certain properties (key, value), what I want is to get a particular property from rel1 and rel2. How do I do that? def traverser(node: Node, rel1: RelationshipType, rel2: RelationshipType, dir1: Direction, dir2: Direction) = { val q1 = node.traverse(Order.BREADTH_FIRST, StopEvaluator.DEPTH_ONE, ReturnableEvaluator.ALL_BUT_START_NODE, rel1, dir1).iterator() while(q1.hasNext){ val n = q1.next() val q2 = n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,ReturnableEvaluator.ALL_BUT_START_NODE, rel2, dir2).iterator() while(q2.hasNext) println(q2.next) } } ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] GSoC 2011 Neo4j Geoprocessing | Weekly Report #8
Hi, This week I started with my second phase of GSOC which means to create an Neo4j geoprocessing example in uDig. For that I set up the development environment for uDig. Also added some more code comments to the spatial functions and installed the doc-toolchain for Neo4j (Spatial). Currently I´m checking the GeoServer integration of Neo4j Spatial. Best Regards Andreas ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] GSoC 2011 Neo4j Geoprocessing | Weekly Report #8
Hi, First, thanks a lot for your work :) If you have time, i post a bug on github about the integration of neo4jSpatial into geoserver, if you want some help on this point, i'am here and ready ! ;) https://github.com/neo4j/neo4j-spatial/issues/12 Best regards, SRey. On Fri, Jul 22, 2011 at 8:52 PM, Andreas Wilhelm a...@kabelbw.de wrote: Hi, This week I started with my second phase of GSOC which means to create an Neo4j geoprocessing example in uDig. For that I set up the development environment for uDig. Also added some more code comments to the spatial functions and installed the doc-toolchain for Neo4j (Spatial). Currently I´m checking the GeoServer integration of Neo4j Spatial. Best Regards Andreas ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- http://stackoverflow.com/users/385881/reyman64 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Officially supported mechanism for J2EE
Sorry for the quantity of my questions, and I apologize in advance if any of them are trivial or stupid. ok - so I guess that in my Session Bean I would use the regular old @Resource annotation: @Resource GraphDatabaseService graphDb; Or do I need to declare Neo to jndi and then reference it? @Resource(name=neo/myGraphDb) GraphDatabaseService graphDb; Do I have to update the server.xml file so graphDb knows what to open? I am assuming that there is no connection pooling. I am assuming that my Session Bean does not need to be a Singleton. Is an alternative for me to actually open in ejbCreate? As you stated, it is important to release everything when I'm done ... would that be done thru ejbRemove? OK - so now I'll need XA transaction support. I have never done anything with XA. I am trying to look up articles on Google for Glassfish ... so far I have found very little. I'm not sure yet if Glassfish has built-in support for XA (I'm assuming it does) and I can just use the javax.transaction package, or if I have to do special app server configuration ... and not yet sure if/how to set it all up as a container managed transaction. Can you tell I am not yet comfortable with J2EE? :-) Frankly, I am evaluating the use cases to see if I ever need to share a transaction with the database or if they are always separate (or if I can design so they are always separate). I am essentially using Neo4j as a hierarchic index against a mysql table .. lots of queries but very very few inserts or updates. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Officially-supported-mechanism-for-J2EE-tp3176938p3192177.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] NOSQL article on InfoWorld
Hello There's also a thread on the article at Slashdot: http://it.slashdot.org/story/11/07/21/1858250/Making-Sense-of-the-NoSQL-Standouts - Charles Edward Bedón Cortázar ITIL Foundation Certified Open Source Network Inventory for the masses! http://kuwaiba.sourceforge.net | Follow Kuwaiba on Twitter Linux Registered User #38 Am Thu, 21 Jul 2011 07:40:02 -0500 Michael Hunger lt;michael.hun...@neotechnology.comgt; schrieb Hey Graphistas, there is a new article on NOSQL databases on InfoWorld. The part for Neo4j is badly researched. If anyone of you thinks he could add some useful information for the reader, please do so in the commenting section. Thanks so much Michael http://www.infoworld.com/d/data-explosion/no-sql-new-databases-new-applications-400?page=0,4 ___ 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] Hyperedges and Objects
I simplified the implementation of the enhanced API, mostly removal of code duplication, and added support of a property value associated node. Looking for feedback, especially with regard to the defined interfaces. Use of the enhanced features of the API has consequences for the name/node space: Relationships: an additional property may be created on the relationship.PropertyTypes: may create nodes as a subref of the reference node.RelationshipTypes: may create nodes as a subref of the reference node.Properties: an additional property (per property) may be create on the node. Niels From: pd_aficion...@hotmail.com To: user@lists.neo4j.org Date: Fri, 22 Jul 2011 04:00:18 +0200 Subject: Re: [Neo4j] Hyperedges and Objects I uploaded the first edit (still needs to completely be tested - IS-PRE-ALPHA quality) of the enhanced API. See: https://github.com/peterneubauer/graph-collections/tree/master/src/main/java/org/neo4j/collections/graphdb The enhanced API has several new features: 1.) A new interface RelationshipContainer, supporting createRelation, getRelation, and hasRelation methods. 2.) Relationship implements RelationshipContainer so relationships to and from relationships can be created. A relationship property is maintained containing the node ID of an associated node. This node is lazily created (and with that the relationship property is set). Relationships are stored on the associated node, while properties are stored on the relationship itself. 3.) EnhancedRelationshipType implements RelationshipContainer (and with that PropertyContainer) so RelationshipTypes can have properties and relationships. A node associated with a RelationshipType is created lazily. From the reference node a RELTYPE_SUBREF relation points to a node, containing properties corresponding to RelationshipType names. The value of this property is the node ID of the RelationshipType associated node. All relationships creation to and from a EnhancedRelationshipType and all properties setting on a EnhancedRelationshipType are performed on the associated node. All retrievals are done from the associated node. The associated node is created the first time it is needed. 4.) PropertyType implements RelationshipContainer (and with that PropertyContainer). PropertyTypes can be used in getProperty, setProperty and hasProperty style operations. PropertyTypes are parameterized with the datatype of the property. This makes it possible to support methods such as: T getPropertyValue(PropertyType) and setProperty(PropertyTypeT, T) that guard property values added conform to the datatype presumed by the PropertyType and property values are returned typed. A node associated with a PropertyType is created lazily. From the reference node a PROPTYPE_SUBREF relation points to a node, which points to nodes per datatype. These datatype related nodes contain properties corresponding to PropertyType names. All relationships creation to and from a PropertyType and all properties setting on a PropertyType are performed on the associated node. All retrievals are done from the associated node. The associated node is created the first time it is needed. 5.) GraphDatabaseService allows for the lookup of PropertyTypes and RelationshipTypes and enhanced Nodes and Relationships. 6.) Property implements RelationshipContainer (and with that PropertyContainer). //TODO A node associated to a property is created lazily, allowing properties to have relationships and properties. The associated node is created the first time it is needed. With these enhancements, all elements of Neo4j (Node, Relationship, RelationshipType, property name and property value) are unified, sharing a common interface RelationshipContainer (and with that PropertyContainer). Node and Relationship also extend their original interfaces, so the API is a drop-in replacement for the original API. Both ProperyType and RelatioshipType now provide the necessary methods to implement a type/class system on top of Neo4j, but nothing imposes a type/class system. Being able to create Relationships to and from Relationships opens the way to a transparent implementation of n-ary relationships. This is all neat, I believe, but I would be really happy if there could be some support in core to hide the implementation a bit more. Now: 1.) Relationships can have a property containing the node ID of the associated node. This polutes the namespace, so it would be better if there were a setLong and getLong method on Relationship, where the node ID can be stored, keeping the property name away from the property namespace. 2.) Named persistent maps from String to PropertyContainer. This would eliminate the REL_SUBREF related node and the PROP_SUBREF related nodes. It would be nice if these enhancements didn't polute the node space.
Re: [Neo4j] Neo4j server - Gremlin plugin - line break in script
Hi Peter, Thanks for your answer. I knew that it was possible to put semi colons for line break ;-) To be more precise, I have the following script that was given kindly given by Marko on another thread. m = [:] g.idx('id')[[object_type:'A']].transform{ if(it.out('USES'){it.object_type.equals('B')}.count() 1) count = 1 else count 1 }.groupCount(m) -1 m I know it is possible to do the same following in one line (see below) however I would like, for more readability to be able to submit it to the REST gremlin plugin with multiple lines. m = [:] ;g.idx('id')[[object_type:'A']].transform{if(it.out('USES'){it.object_type.equals('B')}.count() 1) count = 1 else count 1}.groupCount(m) -1 ; m Guillaume in holiday tonight ;-) -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-server-Gremlin-plugin-line-break-in-script-tp3191845p3192325.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] Neo4j server - Gremlin plugin - line break in script
Mmh, ok, I get the thought. Will see how we could do that. How would you like to submit this? JSON with \n instead of ;? Wanna write a test for this. Now back to parental leave and the catastrophe in Norway. 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 Fri, Jul 22, 2011 at 10:25 PM, Guillaume ALLEE guillaume.al...@capgemini.com wrote: Hi Peter, Thanks for your answer. I knew that it was possible to put semi colons for line break ;-) To be more precise, I have the following script that was given kindly given by Marko on another thread. m = [:] g.idx('id')[[object_type:'A']].transform{ if(it.out('USES'){it.object_type.equals('B')}.count() 1) count = 1 else count 1 }.groupCount(m) -1 m I know it is possible to do the same following in one line (see below) however I would like, for more readability to be able to submit it to the REST gremlin plugin with multiple lines. m = [:] ;g.idx('id')[[object_type:'A']].transform{if(it.out('USES'){it.object_type.equals('B')}.count() 1) count = 1 else count 1}.groupCount(m) -1 ; m Guillaume in holiday tonight ;-) -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-server-Gremlin-plugin-line-break-in-script-tp3191845p3192325.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] How often are Spatial snapshots published?
Hi! Are these snapshots rebuilt regularly? Now they are, again: http://m2.neo4j.org/snapshots/org/neo4j/neo4j-spatial/0.6-SNAPSHOT/ /anders Thanks. ___ 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] how many relationships?
How would I go about getting all relationships in the entire database ? (with neo4j embedded) I see there is an db.getAllNodes() for nodes is there something similar for relationships? On Wed, Jul 20, 2011 at 7:13 PM, cyuczi eekc cyuczie...@gmail.com wrote: Is there a way to get the number of relationships without having to iterate through (and count++) them? ie. rels=firstNode.getRelationships(); rels.size(); //doesn't actually exist ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] How often are Spatial snapshots published?
Nice, thanks Anders! And, we want to make a 0.6 release ASAP before merging in all the new good stuff. 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 Fri, Jul 22, 2011 at 11:33 PM, Anders Nawroth and...@neotechnology.com wrote: Hi! Are these snapshots rebuilt regularly? Now they are, again: http://m2.neo4j.org/snapshots/org/neo4j/neo4j-spatial/0.6-SNAPSHOT/ /anders Thanks. ___ 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] how many relationships?
for (Node node : db.getAllNodes()) for (Relationship rel : node.getRelationships(Direction.OUTGOING)) { // your code here } Michael Am 22.07.2011 um 23:40 schrieb John cyuczieekc: How would I go about getting all relationships in the entire database ? (with neo4j embedded) I see there is an db.getAllNodes() for nodes is there something similar for relationships? On Wed, Jul 20, 2011 at 7:13 PM, cyuczi eekc cyuczie...@gmail.com wrote: Is there a way to get the number of relationships without having to iterate through (and count++) them? ie. rels=firstNode.getRelationships(); rels.size(); //doesn't actually exist ___ 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] Officially supported mechanism for J2EE
No, that's wrong. To create ( and shut down GraphDatabaseService in your bean, you should: 1) create @Singleton session bean. In its @PostConstruct method, create appropriate GraphDataBase service object, and stop it in @PreDestroy method. You can mark that bean as created on startup, if you wish to get possible database errors on deployment instead of the first use. 2) create producer method for GraphDataBaseService : @Produces public GraphDataBaseService getDatabase() { return db; } 3) inject GraphDataBaseService wherever you need it: @Inject private GraphDataBaseService db; The most tricky part is Transaction synchronization. There are two options: - manage transactions in your code by GraphDataBaseService , if you don't need to synchronize it with other resources. - create custom TransactionManagerProvider that enforces Neo4j to use TransactionManager provided by server instead of built-in. You can grab such code from Spring Data Graph project or my Neo4j connector. Spring implementation injects TransactionManager from framework, so you will need at least spring core while my code gets TransactionManager from JNDI, that works in some servers only. All other resources participated the same transaction with Neo4j should also use XA Transactions. On Fri, Jul 22, 2011 at 12:02 PM, eialbur ronalb...@gmail.com wrote: Sorry for the quantity of my questions, and I apologize in advance if any of them are trivial or stupid. ok - so I guess that in my Session Bean I would use the regular old @Resource annotation: @Resource GraphDatabaseService graphDb; Or do I need to declare Neo to jndi and then reference it? @Resource(name=neo/myGraphDb) GraphDatabaseService graphDb; Do I have to update the server.xml file so graphDb knows what to open? I am assuming that there is no connection pooling. I am assuming that my Session Bean does not need to be a Singleton. Is an alternative for me to actually open in ejbCreate? As you stated, it is important to release everything when I'm done ... would that be done thru ejbRemove? OK - so now I'll need XA transaction support. I have never done anything with XA. I am trying to look up articles on Google for Glassfish ... so far I have found very little. I'm not sure yet if Glassfish has built-in support for XA (I'm assuming it does) and I can just use the javax.transaction package, or if I have to do special app server configuration ... and not yet sure if/how to set it all up as a container managed transaction. Can you tell I am not yet comfortable with J2EE? :-) Frankly, I am evaluating the use cases to see if I ever need to share a transaction with the database or if they are always separate (or if I can design so they are always separate). I am essentially using Neo4j as a hierarchic index against a mysql table .. lots of queries but very very few inserts or updates. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Officially-supported-mechanism-for-J2EE-tp3176938p3192177.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 -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] how many relationships?
Though that is kind of telling me that relationships only exist in java as wrappers for an ordered tuple of nodes. I guess I was thinking that they were stored/accessed differently as unique objects(since they each have an id)... maybe they are but neo4j isn't exposing a method for parsing relationships directly, that is without going through a node first. The method you suggested seems like the long way to parse all relationships. Still, I will use it nonetheless ;) Thank you! On Fri, Jul 22, 2011 at 11:57 PM, Michael Hunger michael.hun...@neotechnology.com wrote: for (Node node : db.getAllNodes()) for (Relationship rel : node.getRelationships(Direction.OUTGOING)) { // your code here } Michael Am 22.07.2011 um 23:40 schrieb John cyuczieekc: How would I go about getting all relationships in the entire database ? (with neo4j embedded) I see there is an db.getAllNodes() for nodes is there something similar for relationships? On Wed, Jul 20, 2011 at 7:13 PM, cyuczi eekc cyuczie...@gmail.com wrote: Is there a way to get the number of relationships without having to iterate through (and count++) them? ie. rels=firstNode.getRelationships(); rels.size(); //doesn't actually exist ___ 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] OSGi and Neo4j - superbundle approach
I'm seriously trying the superbundle approach and can't get rid of No index provider 'lucene' found. The tests at https://github.com/neo4j/neo4j-osgi run successful but I have serious problems to transfer them to my application (I'm using Felix 3.2.1 on a Mac). Just to check my understanding: the No index provider 'lucene' found problem is with fine granular bundling, OSGi classloaders, and Java's service loader. One way to solve it is the superbundle approach: putting the user application's activator and all required neo and lucene bundles/libs into a single bundle. Correct? So I took neo4j-osgi/bundle/pom.xml as an template for my application's pom, especially its bundle plugin configuration: Import-Package!javax.transaction.*,!com.sun.*,!sun.misc.*,!org.junit.*,!junit.*,*;/Import-Package Export-Packageorg.neo4j.*;version=1.4,*/Export-Package Embed-Dependency*;scope=compile|runtime/Embed-Dependency Embed-Transitivetrue/Embed-Transitive and added my application's activator: Bundle-Activator de.deepamehta.neo4j.Activator/Bundle-Activator The activator's start() method is fairly simple: public void start(BundleContext context) { GraphDatabaseService neo4j = new EmbeddedGraphDatabase(test-db); IndexNode index = neo4j.index().forNodes(exact); } But it throws: java.lang.IllegalArgumentException: No index provider 'lucene' found The bundle list looks fine (#1 is the super bundle): ID|State |Level|Name 0|Active |0|System Bundle (3.2.1) 1|Resolved |5|Neo4j OSGi Test (0.1.0) 2|Active |1|Apache Felix Gogo Command (0.8.0) 3|Active |1|Apache Felix Gogo Runtime (0.8.0) 4|Active |1|Apache Felix Gogo Shell (0.8.0) To let you reproduce this I packed a minimal test project here: https://github.com/jri/neo4j-osgi-test Run it: git clone git://github.com/jri/neo4j-osgi-test.git cd neo4j-osgi-test mvn clean install pax:run This uses pax runner to provision the super bundle in a Felix runtime. Deploying the super bundle manually in Felix makes no difference. Using the latest Maven bundle plugin (2.3.5 instead of 1.4) makes no difference (after tweaking the pom a little) and also getting rid of the bundle plugin's warnings (again by tweaking the pom) makes no difference. Who can help? Cheers, Jörg ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Jörg, Will try to check it out tomorrow. Now sleep. Thanks for the test! /peter Sent from my phone. On Jul 23, 2011 1:10 AM, Jörg Richter j...@deepamehta.de wrote: I'm seriously trying the superbundle approach and can't get rid of No index provider 'lucene' found. The tests at https://github.com/neo4j/neo4j-osgi run successful but I have serious problems to transfer them to my application (I'm using Felix 3.2.1 on a Mac). Just to check my understanding: the No index provider 'lucene' found problem is with fine granular bundling, OSGi classloaders, and Java's service loader. One way to solve it is the superbundle approach: putting the user application's activator and all required neo and lucene bundles/libs into a single bundle. Correct? So I took neo4j-osgi/bundle/pom.xml as an template for my application's pom, especially its bundle plugin configuration: Import-Package!javax.transaction.*,!com.sun.*,!sun.misc.*,!org.junit.*,!junit.*,*;/Import-Package Export-Packageorg.neo4j.*;version=1.4,*/Export-Package Embed-Dependency*;scope=compile|runtime/Embed-Dependency Embed-Transitivetrue/Embed-Transitive and added my application's activator: Bundle-Activator de.deepamehta.neo4j.Activator/Bundle-Activator The activator's start() method is fairly simple: public void start(BundleContext context) { GraphDatabaseService neo4j = new EmbeddedGraphDatabase(test-db); IndexNode index = neo4j.index().forNodes(exact); } But it throws: java.lang.IllegalArgumentException: No index provider 'lucene' found The bundle list looks fine (#1 is the super bundle): ID|State |Level|Name 0|Active | 0|System Bundle (3.2.1) 1|Resolved | 5|Neo4j OSGi Test (0.1.0) 2|Active | 1|Apache Felix Gogo Command (0.8.0) 3|Active | 1|Apache Felix Gogo Runtime (0.8.0) 4|Active | 1|Apache Felix Gogo Shell (0.8.0) To let you reproduce this I packed a minimal test project here: https://github.com/jri/neo4j-osgi-test Run it: git clone git://github.com/jri/neo4j-osgi-test.git cd neo4j-osgi-test mvn clean install pax:run This uses pax runner to provision the super bundle in a Felix runtime. Deploying the super bundle manually in Felix makes no difference. Using the latest Maven bundle plugin (2.3.5 instead of 1.4) makes no difference (after tweaking the pom a little) and also getting rid of the bundle plugin's warnings (again by tweaking the pom) makes no difference. Who can help? Cheers, Jörg ___ 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] OSGi and Neo4j - superbundle approach
On Jul 23, 2011, at 1:13, Peter Neubauer wrote: Will try to check it out tomorrow. Now sleep. Thanks for the test! Sure. Just one addition for tomorrow: the only neo-bundles my application need are kernel and lucene-index. So I did add just these 2 to the super bundle's dependencies instead the neo4j meta package. Good night! Jörg ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] How often are Spatial snapshots published?
Awesome! Thanks a bunch. On 07/22/2011 04:33 PM, Anders Nawroth wrote: Hi! Are these snapshots rebuilt regularly? Now they are, again: http://m2.neo4j.org/snapshots/org/neo4j/neo4j-spatial/0.6-SNAPSHOT/ /anders Thanks. ___ 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] how many relationships?
Hi John, Relationships are stored in a different store than nodes. This enables Neo4j to manage lifecycle events (like caching) for nodes and relationships separately. Neo4j really is a graph DB, not a tripple store masquerading as a graph DB. Nonetheless, that code Michael sent still works :-) Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] how many relationships?
Hey Jim, I am sort of glad to hear that, maybe in the future I could see a method like getAllRelationships(), or not, np :) Yes, using Michael's code works, but ... total relations count=100,011 timedelta=3,075,897,991 ns it kind of takes 3 seconds (when not cached) to count 100k relationships (considering there are 100k+2 unique nodes too) when cached: total relations count=100,011 timedelta=154,673,763 ns Still, it's pretty fast, but I have to wonder if it would be faster if using relationships directly :) Either way, wish y'all a great day! On Sat, Jul 23, 2011 at 3:57 AM, Jim Webber j...@neotechnology.com wrote: Hi John, Relationships are stored in a different store than nodes. This enables Neo4j to manage lifecycle events (like caching) for nodes and relationships separately. Neo4j really is a graph DB, not a triple store masquerading as a graph DB. Nonetheless, that code Michael sent still works :-) Jim ___ 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] shortestPath slower than it could be
Hey guys, me bugging you again :) (This whole thing is kind of based on the lack of being able to get the number of relationships a node has) If I have two nodes, and the first one has 1 million outgoing relationships of the type X to 1 million unique/different nodes, and the second node has 10 incoming relationships of type X (same type) of which one is from the first node, then using GraphAlgoFactory.shortestPath (or suggest a better way?) How can I tell neo4j to iterate the search on the second node's incoming rels simply because it has 10 relationships instead of 1 million, in order to check if each relationship is in the form of firstNode--secondNode ? For the case when first node has 100,000 relationships and second node has 10, it takes *1.7 seconds* for shortestPath to find the only one link between them using: final PathFinderPath finder = GraphAlgoFactory.shortestPath( Traversal.expanderForTypes( rel, Direction.OUTGOING ), 1 ); final Path foundPath = finder.findSinglePath( *one, two* ); I can put Direction.*BOTH *and get the same amount of time *Path from one to two: (one)--(two) timedelta=1,862,726,634 ns* *BUT*, get this: if I swap the nodes: finder.findSinglePath(* two, one*); and i use either Direction.INCOMING or Direction.*BOTH *(which makes sense for the second node ,right) then I get *20ms* the time until it finishes... *Path from one to two: (two)--(one) timedelta=20,830,111 ns* (both cases are without data being priorly cached) I was expecting it to act like this: (but only when using Direction.BOTH) see which node has the least number of relationships and iterate on those, but this would work if findSinglePath would be made for depth 1 (aka particular case), but as I read Tries to find a single path between startand end nodes. then it makes sense to me why it works like it does... that is, iterate on relationships from start node, rather than from end node... but I'm not sure if it would *not *make sense to iterate on the end node instead of start node, when knowing that end node has less relationships, for make the search faster (well at least if depth is one) - I didn't look into how neo4j actually does stuff yet :D anyway, it's fairly clear to me that I could make a simple wrapper method to make this kind of search faster, *IF* I had the ability to know how many relationships each node has, so I can call findSinglePath with the first param being the node with the least relationship count :) But as I understood it, it's not possible to find how many rels a node has... gimme feat! :)) [by not possible I mean, without having to iterate thru all and count them, which would make the use case here obsolete] PS: clearly all the text I wrote here would benefit from being represented by a graph, just think about all those grouping with autohiding the ie. [] and all kinds of stuff... heh ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Hybrid Relational + Graph solution
I'm creating a social network. I would like to use Neo4J to represent the relationships between people (FOLLOWS, WENT_TO, LIKES) and other objects I have in my network. I already started storing the users (and other objects) in PostgreSQL tables. Is it reasonable to use PostgreSQL to store the objects while using Neo4J to store the relationships between these objects? I would use ids as vertex properties and would fetch the data for each object from PostgreSQL. One problem I see with this approach is that if I want to traverse the graph and use the data of the objects I would have to duplicate the data and add more properties to the vertexes. But I also think that minimizing the use of Neo4J would make it easier for the other developers of the team that are used to relational databases. Do you see more problems on this approach? Does it make thinks much more complicated? Thanks! Felipe ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user