Hi!
Trying to build a social network app with Neo4j 2.0 but unfortunately the
spatial plugin is giving me a hard time. It's difficult to find
documentation/samples and my trial and error approach is rather frustrating
and time consuming so I would really appreciate clarification to a couple
of questions a lot!
A short simplified description of my domain is that I have Places and Users
which both have the properties lat and lon. I have managed to add a simple
point layer and a spatial index geom to my db. Then I have created user and
place nodes and added them to the index and after that to the point layer.
Using the web interface the nodes and relationships look correct but I am
having problems quering and updating the data:
1. My most common use case is that I want to return nearby users and places
from a users given position. Using cypher and the withinDistance query
START n=node:geom('withinDistance:[60.0, 15.0, 100.0]') RETURN n; I am only
able to get the nearest node even though there are multiple nodes situated
within the given distance. Have I misunderstood that withinDistance should
return all nodes within the given distance ordered by distance? Is there
any way to return the distance metric too? I really would like to tell
UserA that UserB is only 200 metres away.
2. Another thing is that I would like to differentiate between the node
type User and Place, is it possible to filter the withinDistance query just
to return my Users för example?
3. My users location will be updated every 10 minutes or so. When I tried
to only update the User nodes lat and lon property I get a
"NotFoundException: NODE[28] has no property with propertyKey=\"bbox\"."}
System.Exception
{Neo4jClient.NeoException} the next time I execute the withinDistance
query. What is the correct way to update a location, should I remove the
node from the point layer and add it again if the lat and lon change and
how do I do that, the manual at http://neo4j.github.io/spatial/ which I
have been following only tells how to add a node to a layer.
4. Another thing I would like to do is set the nearest City for every
logged in User. Is there any way to get the nearest Place from a given
point without specify a distance?
Many thanks,
Jenny.
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.