lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Lee <>
Subject trying to boost a phrase higher than its individual words
Date Thu, 27 Oct 2005 23:13:22 GMT
I have a situation where I want to search for individual words in a  
phrase as well as the phrase itself.  For example, if the user enters  
["classical music"] (with quotes) I want to find documents that  
contain "classical music" (the phrase) *and* the individual words  
"classical" and "music".

Of course, I could just search for the individual words and the  
phrase would get found as a consequence.  But I want documents  
containing the phrase to appear first in the search results, since  
the phrase is the user's primary interest.

I've constructed the following query, using boost values...

     [+(content:"classical music"^5.0 content:classical^0.1  

...but the boost values don't seem to affect the order of the search  

Am I misunderstanding the purpose or proper usage of boosts, and if  
so, can someone explain (at least roughly) how to achieve the desired  


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

View raw message