Chris,

I see what you're saying now ... yes, for cases like this it probably
would be useful to a way to prevent the Comparator from being cached ...
That's what I'm talking about.
I agree this is very uncommon case.

perhaps by adding a SortComparatorSource.isCachable() method ... but the
changes you suggested would completely eliminate the ability for Lucene to
cache custom comparators at all -- which owuld be just as bad for many
people as the current behavior is for you.
It would be great if we have some isCachable method but i understand
all your points about compatibility.
I do not suggest to apply my patch - this is just "works for me" workaround.
Is it possible to add some kind of SortComparatorSource class / not
interface in new lucene releases with default behaviour to cache
ScoreDocComparators?

On a related note: have you considered using FunctionQueries (in teh Solr
code base) to do your distance calculations? ... it's been discussed on
the java-users list a few times ... now that i understand that
DistanceComparatorSource caches the computed distances for each requested
"center" point, FunctionQuery certainly seems like a better way to go.
To say the truth i can't figure out how to switch from lucene sorting
capabilities to FunctionQueries. I have altered RequestHandler with
parsing SolrQueryRequest, building  complex Query, ChainedFilters,
Sort objects and i do not want to change all that stuff.

Thanks

Aleksey

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to