lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Boosting Fields (in index) or Queries
Date Fri, 14 Apr 2006 00:17:59 GMT
The best recommendation is to have a look at the Explanation returned  
from IndexSearcher.explain() for a specific query and document to  
trace how things are being scored.  Is it possible you're boosting  
all documents by the same amount?


On Apr 13, 2006, at 6:29 PM, Jeremy Hanna wrote:

> I have a situation where I'm indexing database entries and have  
> fields such as:
> name
> sku
> model
> category name
> description
> features
> specifications
> I am trying to set a priority higher for the name, category name,  
> and description.
> I've tried setting the fields' boost values as I've indexed the db  
> and it seemed to have little or no result.
> When I tried to do the queries, I started using the  
> MultiFieldQueryParser but found that those don't have priority or  
> boost values you can set on any of the Fields at query time.  Then  
> I tried to have separate query parsers - one for each field.  That  
> way I could set a boost level for each of the queries created by  
> those query parsers.  I joined them together with a BooleanQuery  
> and all of them set to BooleanQuery.Occur.SHOULD.  I ended up  
> setting the features, specifications, and description to default to  
> Query.Operator.AND and that helped, but the boost value seems to do  
> nothing.
> I try to set the categoryParser's query boost to 4.0f, then 8.0f,  
> then 20.0f and have tried downgrading other queries, but the  
> results don't change at all in their order.
> I am using 1.9.1 and for my database I'm using hibernate to mysql 5  
> and ArrayLists with the bag mapping in hibernate.
> Does anyone have any thoughts or suggestions?
> Thanks!
> Jeremy
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message