Open Sapulidi opened 1 year ago
Hi @Sapulidi thank you very much for raising this interesting feature. We will take into consideration prioritising this feature as we're collecting more geospatial use cases.
In the meantime, what I could suggest is to create an index on the point property and this should enable cypher statements to return back the data in a sorted ordered. The issue with this workaround is that it's quite CPU expensive and depending on the amount of data you have it can get quite slow.
I suggest you take a look at our cypher documentation which may help you finding a workaround until we can properly embed this capability in the library.
Bascially, I would like to be able to get the 100 (limit) people who are closest to a certain location. And if possible sort them afterwards but that can be done in post processing if needed.
I am building an application that shows me nodes who are close to my location. Let's say I have 5 nodes: A, B, C, D and E. Node A is closest to me and node E is the farthest away. I expect the following query to return A, B and C but instead it returns A, B and E.
I just found out through the Discord server that the sort is not related to the location (which I thought it was). I currently get a fairly good results if I make 2 separate queries LT and GT but if I add more filtering, some nodes nearby that should be in the results get dropped.
An example of what I'd like might look like this (if you implement this I trust you will use better naming than me).
For more context (Neo4J Discord thread): https://discord.com/channels/787399249741479977/1148644450097168524
Thanks!