: Looking into the code it seems like a Lucene problem, more than Solr. It is : in the RangeQuery and RangeFilter classes. The problem with changing this to : have a sorted index and than binary search is that you have to sort it, : which is slow. Unless we can store the ordered index somewhere and reuse it, : it will be even slower than now. And if we store it, we will have to face : the problem with updating ordered index with new terms.
FWIW: Lucene Term enumeration is already indexed, it's just not a binary search tree (the details escape me at the moment, but there there is an interval value of N somewhere in the code, and every Nth Term is loaded into memory so a TermEnum.seek can skip ahead N terms at a time). But the number of unique terms can be a bottle neck ... rounding to the level of precision you absolutely need can save you in these cases by reducing the number of unique terms. -Hoss