Re: Spatial Search based on the amount of docs, not the distance

2017-06-28 Thread David Smiley
Deniz didn't mention document-to-document distance sort but he/she didn't say it wasn't that case either. Any way, FYI at the Lucene level with LatLonPoint there is some sophisticated BKD search code to efficiently return the top N distance ordered documents (where you supply N). Although as

Re: Spatial Search based on the amount of docs, not the distance

2017-06-22 Thread Tim Casey
deniz, I was going to add something here. The reason what you want is probably hard to do is because you are asking solr, which stores a document, to return documents using an attribute of document pairs. As only a though exercise, if you stored record pairs as a single document, you could

Re: Spatial Search based on the amount of docs, not the distance

2017-06-21 Thread Erick Erickson
Would it serve to sort by distance? True, if you matched a zillion documents within a 1km radius you'd still perform the distance calcs, but the result would be a manageable number. I have to ask "Why to you care?". Is this an efficiency question (i.e. you want to keep Solr from having to do

Re: Spatial Search based on the amount of docs, not the distance

2017-06-21 Thread deniz
it is for sure possible to use d value for limiting the distance, however, it might not be very efficient, as some of the coords may not have any docs around for a large value of d... so it is hard to determine a default value for d. though it sounds like havinga default d and gradual increments

Re: Spatial Search based on the amount of docs, not the distance

2017-06-21 Thread alessandro.benedetti
As any other search you can paginate playing with the 'row' and 'start' parameters ( or cursors if you want to go deep), show only the first K results is your responsibility. Is it not possible in your domain to identify a limit d ( out of that your results will lose meaning ?) You can not match

Spatial Search based on the amount of docs, not the distance

2017-06-21 Thread deniz
I am trying to figure out if it is possible to have the spatial search limit itself based on the amount of docs rather than the distance... What I want is, sth like "closest XXX documents from point(x,y)" in dependent from "d" value in the query... would this need a custom plugin, or there are