There are a few things to try: - Improve performance of Neo4j in general through cache/mmap configurations. http://docs.neo4j.org/chunked/milestone/configuration.html - Use the alternative REST API for indexing and search for nodes. This might be slightly faster. Instead of creating a normal index, create a layer, and call special REST calls to add nodes to that layer and search that layer. See the SO discussion for more information - http://stackoverflow.com/questions/17966722/neo4j-spatial-withindistance-cypher-query-returns-empty-while-rest-call-return
There are a few things about the current implementation that are not optimal, but if you can expand your cache to cover a large part of the graph, the known performance issues should be reduced, so I think the first option above is most likely to help the most. On Tue, Sep 16, 2014 at 2:47 AM, Phu Huynh <[email protected]> wrote: > I'm trying to evaluate if neo4j spatial is the right solution for simple > geospatial searches. I've imported ~200k locations into a local neo4j > database via the rest api and have started to query it using cypher in the > neo4j shell > > I'm finding that queries like the one below are taking up to 5 seconds. > This seems a bit slow to me, so I would like to ask how to improve the > performance of this query. Are there any configuration options that I > should be looking at? > > neo4j-sh (?)$ start node = > node:geom('withinDistance:[33.74242401123047,-90.71835327148438, 20.0]') > return node; > > +----------------------------------------------------------------------------------------------------------------------------+ > | node > | > > +----------------------------------------------------------------------------------------------------------------------------+ > | > Node[34002]{name:"Goody's",lon:-90.71835327148438,lat:33.74242401123047,merchantId:"4e0c509a-8263-4d91-8fca-5b5d5530d7b5"} > | > > +----------------------------------------------------------------------------------------------------------------------------+ > 1 row > 4806 ms > > I'm creating an index with the following configuration: > > {"name" : "geom", > "config" : { > "provider" : "spatial", > "geometry_type" : "point", > "lat" : "lat", > "lon" : "lon" > } > } > > and then simply creating the nodes and adding them to index via the rest > api > > Any advice is appreciated. > > Thanks > > > > > -- > 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. > -- 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.
