lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Boosting a token in the query
Date Wed, 29 Mar 2006 18:41:04 GMT
Unfortunately I'm not sure what boosting capabilities were available  
in 1.2, but that syntax is correct for the 1.4+ at least.

And I'm sure the Explanation feature is not available in 1.2, but  
with more recent versions of Lucene you'd be able to see the effect  
of the boosts on the score.

Does Query have a setBoost() in 1.2?   If so, maybe the parser didn't  
support boosts at that time?   Sorry I'm not of more help.


On Mar 29, 2006, at 10:19 AM, Madhusudan, Veda (Norcross, DAV) wrote:

> Is there a way to boost a token while querying? Example, in the
> following query +(DESC:sheets DESC:sheet), can the token 'sheets' be
> boosted and given higher precedence over 'sheet' so the results  
> matching
> 'sheets ' appear before those for 'sheet'? I am using lucene 1.2. I
> tried using the boost factor for 'sheets' so the query would read:
> +(DESC:sheets^2.0 DESC:sheet), but that did not help.
> I have read overriding getFieldQuery of QueryParser would help boost
> terms/tokens, but this is not available in lucene 1.2. Nor is the
> IndexSearcher's explain method.
> Any ideas on how this can be accomplished?
> Thanks.

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

View raw message