I'm trying to sort on two dependent fields. I realize that if they were
independent I could use new Sort(SortField...) with lots of SortFields,
but I need to compute something based on two fields.
Let me explain:
I'm searching for things near your location (as specified by longitude
and latitude). I've got the search working correctly (with the help of
NumericField), but now I need to sort the results by distance from you.
The closer things appear at the top of the list. I can't store the
distance, because I'll never know where you are searching from, so I
need to calculate it at the time I sort.
How can I do this? I'm thinking I might need to subclass the Sort
object. Or can I subclass the SortField object and give it two field names?
Thanks in advance!
--
Tim Koop
<mailto:t...@timkoop.com>
<http://www.timkoop.com>