lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Hanna <jeremy_ha...@mac.com>
Subject Boosting Fields (in index) or Queries
Date Thu, 13 Apr 2006 23:52:32 GMT
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message