lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ype Kingma <>
Subject Re: Real Boolean Model in Lucene?
Date Tue, 02 Dec 2003 03:33:16 GMT

On Monday 01 December 2003 04:11, wrote:
> Hi,
> is it possible to use a real boolean model in lucene for searching. When
> one is using the Queryparser with a boolean query (i.e. "dog AND horse")
> one does get a list of documents from the Hits object. However these
> documents have a ranking (score).
> My Question: Does Lucene use TF/IDF for getting this? (which would mean it
> does not use the boolean model for the boolean query...)
> How can one use a boolean model search, where the outcome are all score=1 ?
> Example?

You can use the low level scoring API, which simply enumerates all boolean
hits. It also gives you the score, but you can just ignore that if you want.
Use the search() method with a HitCollector, and provide you own HitCollector.

When you do this avoid retrieving documents during the search, retrieve docs
afterwards. Retrieving docs during search would cause unwanted disk head seeks
from the terms index to the stored fields and back.
It is also preferable to retrieve docs in the order that you collect them, ie. independent
of the score.
Even so, retrieving  documents normally takes more time than collecting them.

Kind regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message