Re: [Neo4j] possible to query spatial indexes from gremlin?
Boris, you are seeing the expected results through REST but not through the Webadmin with this query? That sounds like a bug then. 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, Sep 7, 2011 at 5:26 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, still no joy, I run the following query: g.idx('UsersWorld').get('bbox','[-71.070231297681, 42.351920260159, -71.091167203206, 42.375030765981]').count() but get no results, when I run the same query through the rest plugin I get the expected results. I see the index is registered as spatial in the index view. I'm, not sure what else to try. Any help would be appreciated! On Wed, Sep 7, 2011 at 8:21 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, here is finally a working example of a Gremlin index search in Neo4j Spatial, see https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L132 Let us know if this helps! 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 Mon, Aug 22, 2011 at 3:27 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, the name of the index is the name of the corresponding Layer you want to work with, so you should do something like http POST /db/data/index/node/ {name:a72952a1-0969-4fae-87ce-ff404a7b8a3e_world,config:{provider:spatial}} in order to get one of your existing layers. otherwise, a new layer will be created for you, which is not what you want right? I don't know which layers have data in them ... let me know if that works. 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 Thu, Aug 18, 2011 at 5:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite
Re: [Neo4j] possible to query spatial indexes from gremlin?
correct, but through the spatial plugin via rest not gremlin. On Thu, Sep 8, 2011 at 4:23 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, you are seeing the expected results through REST but not through the Webadmin with this query? That sounds like a bug then. 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, Sep 7, 2011 at 5:26 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, still no joy, I run the following query: g.idx('UsersWorld').get('bbox','[-71.070231297681, 42.351920260159, -71.091167203206, 42.375030765981]').count() but get no results, when I run the same query through the rest plugin I get the expected results. I see the index is registered as spatial in the index view. I'm, not sure what else to try. Any help would be appreciated! On Wed, Sep 7, 2011 at 8:21 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, here is finally a working example of a Gremlin index search in Neo4j Spatial, see https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L132 Let us know if this helps! 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 Mon, Aug 22, 2011 at 3:27 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, the name of the index is the name of the corresponding Layer you want to work with, so you should do something like http POST /db/data/index/node/ {name:a72952a1-0969-4fae-87ce-ff404a7b8a3e_world,config:{provider:spatial}} in order to get one of your existing layers. otherwise, a new layer will be created for you, which is not what you want right? I don't know which layers have data in them ... let me know if that works. 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 Thu, Aug 18, 2011 at 5:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for,
Re: [Neo4j] possible to query spatial indexes from gremlin?
Boris, could you please raise an issue in Neo4j Spatial so I can start investigating this? https://github.com/neo4j/spatial/issues?sort=createddirection=descstate=open so we can track it down. Please provide REST calls that work and that don't, will add it to the integration testing :) 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 Thu, Sep 8, 2011 at 3:20 PM, Boris Kizelshteyn bo...@popcha.com wrote: correct, but through the spatial plugin via rest not gremlin. On Thu, Sep 8, 2011 at 4:23 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, you are seeing the expected results through REST but not through the Webadmin with this query? That sounds like a bug then. 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, Sep 7, 2011 at 5:26 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, still no joy, I run the following query: g.idx('UsersWorld').get('bbox','[-71.070231297681, 42.351920260159, -71.091167203206, 42.375030765981]').count() but get no results, when I run the same query through the rest plugin I get the expected results. I see the index is registered as spatial in the index view. I'm, not sure what else to try. Any help would be appreciated! On Wed, Sep 7, 2011 at 8:21 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, here is finally a working example of a Gremlin index search in Neo4j Spatial, see https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L132 Let us know if this helps! 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 Mon, Aug 22, 2011 at 3:27 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, the name of the index is the name of the corresponding Layer you want to work with, so you should do something like http POST /db/data/index/node/ {name:a72952a1-0969-4fae-87ce-ff404a7b8a3e_world,config:{provider:spatial}} in order to get one of your existing layers. otherwise, a new layer will be created for you, which is not what you want right? I don't know which layers have data in them ... let me know if that works. 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 Thu, Aug 18, 2011 at 5:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer
Re: [Neo4j] possible to query spatial indexes from gremlin?
posted On Thu, Sep 8, 2011 at 9:29 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, could you please raise an issue in Neo4j Spatial so I can start investigating this? https://github.com/neo4j/spatial/issues?sort=createddirection=descstate=open so we can track it down. Please provide REST calls that work and that don't, will add it to the integration testing :) 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 Thu, Sep 8, 2011 at 3:20 PM, Boris Kizelshteyn bo...@popcha.com wrote: correct, but through the spatial plugin via rest not gremlin. On Thu, Sep 8, 2011 at 4:23 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, you are seeing the expected results through REST but not through the Webadmin with this query? That sounds like a bug then. 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, Sep 7, 2011 at 5:26 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, still no joy, I run the following query: g.idx('UsersWorld').get('bbox','[-71.070231297681, 42.351920260159, -71.091167203206, 42.375030765981]').count() but get no results, when I run the same query through the rest plugin I get the expected results. I see the index is registered as spatial in the index view. I'm, not sure what else to try. Any help would be appreciated! On Wed, Sep 7, 2011 at 8:21 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, here is finally a working example of a Gremlin index search in Neo4j Spatial, see https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L132 Let us know if this helps! 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 Mon, Aug 22, 2011 at 3:27 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, the name of the index is the name of the corresponding Layer you want to work with, so you should do something like http POST /db/data/index/node/ {name:a72952a1-0969-4fae-87ce-ff404a7b8a3e_world,config:{provider:spatial}} in order to get one of your existing layers. otherwise, a new layer will be created for you, which is not what you want right? I don't know which layers have data in them ... let me know if that works. 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 Thu, Aug 18, 2011 at 5:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You
Re: [Neo4j] possible to query spatial indexes from gremlin?
Boris, the name of the index is the name of the corresponding Layer you want to work with, so you should do something like http POST /db/data/index/node/ {name:a72952a1-0969-4fae-87ce-ff404a7b8a3e_world,config:{provider:spatial}} in order to get one of your existing layers. otherwise, a new layer will be created for you, which is not what you want right? I don't know which layers have data in them ... let me know if that works. 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 Thu, Aug 18, 2011 at 5:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 -
Re: [Neo4j] possible to query spatial indexes from gremlin?
Hehe, Glad to hear you sorted it out! /Peter On Friday, August 19, 2011, Boris Kizelshteyn bo...@popcha.com wrote: sorry false alarm, a runaway job was removing nodes :) On Thu, Aug 18, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, Could you please share the database or some creation script leading up to this so I can have a look? /peter Sent from my phone. On Aug 18, 2011 7:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/%7Bkey%7D/%7Bvalue%7D , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes -- 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] possible to query spatial indexes from gremlin?
Hi All, Peter, I just wanted to bump this thread. Thanks!!! On Thu, Aug 18, 2011 at 1:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn bo...@popcha.com wrote: I'm doing it from the console. On Sun, Aug 7, 2011 at 5:09 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: What is the surrounding code before that call? You gave to at least once get that index as in the test via the index provider parameters before this works. /peter Sent from my phone. On Aug 7, 2011 10:25 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I tried this today but I can't seem to get the syntax right in the context of g.idx, I tried this: g.idx('spatial')[[start n=(mylayer,'bbox:[myvals]') match (n) -[r] - (x) return n.bbox, r~TYPE, x.layer?,
Re: [Neo4j] possible to query spatial indexes from gremlin?
Ehm, what does bump mean? Close or open the thread? Sorry for being an ignorant German :/ Btw, I would LOVE to visit MIT Media Lab at some point with my kids (hint hint)! 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, Aug 19, 2011 at 2:38 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi All, Peter, I just wanted to bump this thread. Thanks!!! On Thu, Aug 18, 2011 at 1:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn
Re: [Neo4j] possible to query spatial indexes from gremlin?
Hey Peter, are you in Boston? If you are anytime you would like, it would be a pleasure to meet you and show you around. On Fri, Aug 19, 2011 at 8:49 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ehm, what does bump mean? Close or open the thread? Sorry for being an ignorant German :/ Btw, I would LOVE to visit MIT Media Lab at some point with my kids (hint hint)! 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, Aug 19, 2011 at 2:38 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi All, Peter, I just wanted to bump this thread. Thanks!!! On Thu, Aug 18, 2011 at 1:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? Cheers, /peter neubauer GTalk: neubauer.peter Skype
Re: [Neo4j] possible to query spatial indexes from gremlin?
Hi Peter, I am experiencing a weird phenomenon where I have some nodes in a spatial layer that are not being returned by the find node in layer query. I have checked everything I know of and they are just not being found. Other nodes are fine. I can see the Rtree index and relationships and they look the same for all nodes, but some are just invisible to the query. Is there anywhere I can look to get additional info? Many thanks, Boris On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn bo...@popcha.com wrote: I'm doing it from the console. On Sun, Aug 7, 2011 at 5:09 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: What is the surrounding code before that call? You gave to at least once get that index as in the test via the index provider parameters before this works. /peter Sent from my phone. On Aug 7, 2011 10:25 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I tried this today but I can't seem to get the syntax right in the context of g.idx, I tried this: g.idx('spatial')[[start n=(mylayer,'bbox:[myvals]') match (n) -[r] - (x) return n.bbox, r~TYPE, x.layer?, x.bbox?]] But it does nothing, not even an error. So I am proly doing something terrible wrong? Also, I don't see the spatial index in the idx list in the webpanel, I know I have one as I am able to query other spatial info. Thanks! On Wed, Aug 3, 2011 at 12:48 PM, Peter Neubauer peter.neuba...@neotechnology.com
Re: [Neo4j] possible to query spatial indexes from gremlin?
Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn bo...@popcha.com wrote: I'm doing it from the console. On Sun, Aug 7, 2011 at 5:09 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: What is the surrounding code before that call? You gave to at least once get that index as in the test via the index provider parameters before this works. /peter Sent from my phone. On Aug 7, 2011 10:25 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I tried this today but I can't seem to get the syntax right in the context of g.idx, I tried this: g.idx('spatial')[[start n=(mylayer,'bbox:[myvals]') match (n) -[r] - (x) return n.bbox, r~TYPE, x.layer?, x.bbox?]] But it does nothing, not even an error. So I am proly doing something terrible wrong? Also, I don't see the spatial index in the idx list in the
Re: [Neo4j] possible to query spatial indexes from gremlin?
Boris, Could you please share the database or some creation script leading up to this so I can have a look? /peter Sent from my phone. On Aug 18, 2011 7:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn bo...@popcha.com wrote: I'm doing it from the console. On Sun, Aug 7, 2011 at 5:09 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: What is the surrounding code before that call? You gave to at least once get that index as in the test via the index provider parameters before this works. /peter Sent from my phone. On Aug 7, 2011 10:25 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I tried this today but I can't seem to get the syntax right in the context of g.idx, I tried this: g.idx('spatial')[[start n=(mylayer,'bbox:[myvals]') match (n) -[r] - (x) return n.bbox, r~TYPE, x.layer?, x.bbox?]] But it does nothing, not even an error. So I am proly
Re: [Neo4j] possible to query spatial indexes from gremlin?
sorry false alarm, a runaway job was removing nodes :) On Thu, Aug 18, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, Could you please share the database or some creation script leading up to this so I can have a look? /peter Sent from my phone. On Aug 18, 2011 7:03 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I'm finally trying this query out, but not getting any results. Do I need to rebuild neo4j-spatial? I sent the index command successfully: - http POST /db/data/index/node/ {name:UsersWorld, config:{provider:spatial}} - == 201 Created - == { - == template : http://reach.media.mit.edu:7474/db/data/index/node/UsersWorld/{key}/{value} , - == provider : spatial - == } But when I query, I get nothing (same query from the plugin produces results): g.idx('UsersWorld').get('bbox','[-71.33467375967257,42.26157716735279,-70.83994567129366,42.45920025563372]') Thanks! On Mon, Aug 8, 2011 at 6:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') 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 Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn bo...@popcha.com wrote: I'm doing it from the console. On Sun, Aug 7, 2011 at 5:09 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: What is the surrounding code before that call? You gave to at least once get that index as in the test via the index provider parameters before this works. /peter Sent from my phone. On Aug 7, 2011 10:25
Re: [Neo4j] possible to query spatial indexes from gremlin?
Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn bo...@popcha.com wrote: I'm doing it from the console. On Sun, Aug 7, 2011 at 5:09 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: What is the surrounding code before that call? You gave to at least once get that index as in the test via the index provider parameters before this works. /peter Sent from my phone. On Aug 7, 2011 10:25 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I tried this today but I can't seem to get the syntax right in the context of g.idx, I tried this: g.idx('spatial')[[start n=(mylayer,'bbox:[myvals]') match (n) -[r] - (x) return n.bbox, r~TYPE, x.layer?, x.bbox?]] But it does nothing, not even an error. So I am proly doing something terrible wrong? Also, I don't see the spatial index in the idx list in the webpanel, I know I have one as I am able to query other spatial info. Thanks! On Wed, Aug 3, 2011 at 12:48 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, I was thinking of adding a test with Gremlin onto https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L90 , but basically, since recently a trivial point layer is exposed as an IndexProvider, enabling Neo4j, Cypher and Gremlin to treat this as a normal index. I have not tested it, but I suspect it works. Give it a try and report back! 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, Aug 3, 2011 at 9:36 AM, Boris Kizelshteyn bo...@popcha.com wrote: how would you do a basic find point in layer type query? 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
Re: [Neo4j] possible to query spatial indexes from gremlin?
Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for, https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature Basically: Create a Spatial Layer Add nodes Load the index with provider=spatial configuration Query it using Cypher Query it using Gremlin Query it using the REST index interface Thus, you can now query the (trivial) point layer index using any of your favorite methods. Is that helpful? 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 Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Ahh ok. In that case, I should extend the capabilities of the REST plugins and add a test for it. Will see if I can get to it tonight, ok? /peter Sent from my phone. On Aug 8, 2011 2:41 PM, Boris Kizelshteyn boris.kizelsht...@popcha.com wrote: Can I set this in the server config? I am doing everything via rest right now, I am using the spatial plugin for doing the spatial operations. On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, make sure that you have initialized the spatial index before you access is. See https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68 for loading the index with provider=spatial. The index is loaded lazy, and thus not available before explicitly loaded. I guess you have to do it in your loading code in Java or Groovy, since you can't provide the configuration in Gremlin or Cypher. After the first load, the index will be saved in the database and be visible as any other index. I haven't tried this out but it should work, as you see in the test case. Does that work? 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 Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn bo...@popcha.com wrote: I'm doing it from the console. On Sun, Aug 7, 2011 at 5:09 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: What is the surrounding code before that call? You gave to at least once get that index as in the test via the index provider parameters before this works. /peter Sent from my phone. On Aug 7, 2011 10:25 PM, Boris Kizelshteyn bo...@popcha.com wrote: Hi Peter, I tried this today but I can't seem to get the syntax right in the context of g.idx, I tried this: g.idx('spatial')[[start n=(mylayer,'bbox:[myvals]') match (n) -[r] - (x) return n.bbox, r~TYPE, x.layer?, x.bbox?]] But it does nothing, not even an error. So I am proly doing something terrible wrong? Also, I don't see the spatial index in the idx list in the webpanel, I know I have one as I am able to query other spatial info. Thanks! On Wed, Aug 3, 2011 at 12:48 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, I was thinking of adding a test with Gremlin onto https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L90 , but basically, since recently a trivial point layer is exposed as an IndexProvider, enabling Neo4j, Cypher and Gremlin to treat this as a normal index. I have not tested it, but I suspect it works. Give it a try and report back! 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, Aug 3, 2011 at 9:36 AM, Boris Kizelshteyn bo...@popcha.com wrote: how would you do a basic find point in layer type query? 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] possible to query spatial indexes from gremlin?
Hey you guys are the best! I will try it this week and get back to you. Thanks! On Mon, Aug 8, 2011 at 7:07 PM, Marko Rodriguez okramma...@gmail.comwrote: Sitting in airports with long layovers make Marko crazy. On Aug 8, 2011 4:49 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: You are to surf and have fun. pushed g.idx('test').get('bbox','[15.0, 16.0, 56.0, 61.0]') Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704... On Tue, Aug 9, 2011 at 12:36 AM, Marko Rodriguez okramma...@gmail.com wrote: Hey, :). Yo... ___ 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] possible to query spatial indexes from gremlin?
how would you do a basic find point in layer type query? Thanks! ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] possible to query spatial indexes from gremlin?
Boris, I was thinking of adding a test with Gremlin onto https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L90, but basically, since recently a trivial point layer is exposed as an IndexProvider, enabling Neo4j, Cypher and Gremlin to treat this as a normal index. I have not tested it, but I suspect it works. Give it a try and report back! 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, Aug 3, 2011 at 9:36 AM, Boris Kizelshteyn bo...@popcha.com wrote: how would you do a basic find point in layer type query? 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