lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ניר פינקלשטיין <>
Subject Calculating costs of queries
Date Mon, 06 Apr 2020 13:14:21 GMT
Hello, my name is Nir and I’m a big fan of Lucene.
Lately I have investigated the inner classes of Lucene to understand
things like the order a conjunction query is executed.

A strange situation happened to me when I compose a Boolean query with
a term query and a prefix query.

I found that the cost of the prefix query was much lower than the cost
of the term query although it has much more docs associated with it.

I tried to understand the calculation of the cost of a prefix query
but found it unclear. (counter / termsPerDoc).

I would be very happy if someone would be able to explain me the calculation.

In Addition I would like to make sure I understand the cost() function
correctly. Isn’t it suppose to help the iterators of a query iterate
the least they can?

Thanks in advance

View raw message