lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Smith" <>
Subject Boosting results
Date Fri, 07 Nov 2008 00:42:35 GMT
I'm interested in comments on the following problem.  


I have a set of documents.  They fall into 3 categories.  Call these
categories A, B, and C.  Each document has an indexed, non-tokenized
field called "category" which contains A, B, or C (they are mutually
exclusive categories).  


All of the documents contain a field called "body" which contains a
bunch of text.  This field is indexed and tokenized.


So, I want to do a search which looks something like:


(category:A OR category:B) AND body:fred


I want all of the category A documents to come before the category B
documents.  Effectively, I want to have the category A documents first
(sorted by relevancy) and then the category B documents after (sorted by


I thought I could do this by boosting the category portion of the query,
but that doesn't seem to work consistently.  I was setting the boost on
the category A term to 1.0 and the boost on the category B term to 0.0.


Any thoughts how to skin this?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message