Best to ask such questions on stackoverflow: In general, index the location array of [lat, lon]
CREATE CONSTRAINT ON (loc:Location) ASSERT loc.coords IS UNIQUE; MERGE (loc:Location {coords:[{lat},{lon}]}) CREATE (m:Measure {value:{value}, time:{time}})-[:AT]->(loc); Alternatively use two coords: latitude and longitude. CREATE INDEX ON :Location(latitude); CREATE INDEX ON :Location(longitude); MERGE (loc:Location {latitude: {lat}, longitude: {lon}}) CREATE (m:Measure {value:{value}, time:{time}})-[:AT]->(loc); HTH Michael Am 26.05.2016 um 13:33 schrieb Jessica Marinho <jlmarinhoco...@gmail.com>: I'm migrating a postgresql database to neo4J. I am using the Python language, but I have a problem. I have a table called 'historico' which marks the rainfall recorded by a sensor in a certain latitude and longitude. My problem is the following: if a node with such latitude and longitude in my database Neo4j, I'll just create a node with precipitation and connect it to the existing node, otherwise I create a new node with latitude and longitude and connect the rainfall node to it. But I don't know how to compare the return of my cypher query in python for I know if there is a node or not. My code: http://pastebin.com/Wbw5a9vK -- 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 neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.