Hi all, I am currently working on improving the performance of range queries on strings. I've noticed that using TermRangeQuery with low-selective queries is a very bad idea in terms of performance but I cannot clearly explain why since it seems related with how the IntersectTermsEnum#next method is implemented.
The Javadoc of the class says that the terms index (the burst-trie datastructure) is not used by this implementation of TermsEnum. However, when I see the implementation of the next method I get the impression that this is not accurate. Aren't we using the trie structure to skip parts of the data when the automaton states do not match? Can somebody provide a high-level intutition of what IntersectTermsEnum#next does? Initially, I thought that it is traversing the whole trie structure (skipping some branches when necessary) but I may be wrong. Thanks in advance, Stamatis