lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksey <bitterc...@gmail.com>
Subject TermRangeQuery performance oddness
Date Tue, 07 May 2013 02:15:19 GMT
Hi guys,

If I run 2 term range queries:

new TermRangeQuery("title", new BytesRef("A"), null, true, true);
and
new TermRangeQuery("title", new BytesRef("Z"), null, true, true);

The one that starts with "Z" is several times faster (I make 1000
queries in a loop to measure). I understand that the first one has
much larger hit number, but if the query is bounded to 50 results, why
does that matter?
At first I thought that it grabs all hits and sorts them, but then it
doesn't seem to make any difference whether or not I pass sort by
"title" parameter to the searcher. Results are either sorted or kind
of random, but speed is the same.
Why is that?

Thank you in advance,

Aleksey

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message