Ralph, On Monday 01 December 2003 04:11, [EMAIL PROTECTED] 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. http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/Searcher.html 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, Ype --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]