DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26702>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26702 [PATCH] arbitrary sorting ------- Additional Comments From [EMAIL PROTECTED] 2004-02-19 18:58 ------- My preference would be for [1]. I don't see a way to implement [2] without re-enumerating terms for each query, which is way slower. There should be a warning in the doc somewherre that sorting by strings when each doc has a unique value uses a fair amount of memory. You might still keep the array of ints to make things faster, with a separate array of strings, indexed by the integer values in the first array. The cost of keeping the ints is a small constant factor, but the speedup may be significant. One other suggestion: The cache in FieldSortedHitQueye would better be implemented with a WeakHashMap, mapping from IndexReader to a HashTable (which in turn maps from field name to comparator). This way one can efficiently search and sort multiple indexes. The clearing of entries would then also be handled by the garbage collector, rather than explicity. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]