I think the main point in the answers to that SO page you referenced is to be consistent. Use either the IndexProvider API or the REST API, but not both. Which one you should choose depends on your usage. If you wish to work mostly with Cypher queries, then go with the IndexProvider API, otherwise go with the normal API. If you wish to import data without Cypher and then query with Cypher, you will need to import in a way that results in the same structure the IndexProvider expects (ie. with no direct links to the geometry nodes, only proxy nodes with id properties). The easiest way, I think, to do this is rely on the code. For example, if you import with a jave unmanaged extension (for performance), you could access the SpatialIndexProvider and add the nodes to the index with that. Then cypher queries of this index should work.
On Sat, May 16, 2015 at 9:53 PM, Jamil Abreu <[email protected]> wrote: > I haven't been able to find many (recent) examples of best practices when > it comes to adding nodes to an index. Should I add the node itself to the > spatial index, or add a new node to the index that points to the node I'd > like to add? There also seems to be a bug related to the various ways > Spatial allows you to add a node to an index. See this StackOverflow page > for an example of what I mean: > > > http://stackoverflow.com/questions/17966722/neo4j-spatial-withindistance-cypher-query-returns-empty-while-rest-call-return > > Any help/direction would be awesome! > > -- > 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.
