: > Using something like this, how would the custom SortComparatorSource
: > get a parameter from the request to use in sorting calculations?

in general: you wouldn't you would have to specify all options as init 
params for the FieldType -- which makes it pretty horrible for distance 
calculations, and isn't something i considered when i posted that.

the only way i can think of that you can really solve the problem with a 
plugin at the moment (without some serious internal changes that yonik 
describes below) would be to use a dynamicField when you want geodistance 
sort, and encode the center lat/lon point in the field name, ala:

   sort=geodist_-124.75_93.45

: or extend solr's sorting mechanisms to allow specifying a function to sort by.
: 
: sort="dist(10.4,20.2,geoloc) asc"

thta would in fact, kick ass.  even if there is a better solution for the 
distance stuff the idea of being able to specify a raw function as a sort 
would be pretty sick. (NOTE: that's "sick" as in "so good it's amazing" 
... since the last person i used that idiom with didn't understand and 
thought i ment "bad")



-Hoss

Reply via email to