lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26702] - [PATCH] arbitrary sorting
Date Thu, 19 Feb 2004 18:58:26 GMT
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 cutting@apache.org  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: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message