You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Olivier Amira <ol...@webmotion.com> on 2002/07/18 21:59:31 UTC
Using Boost factor in queries
Hi all,
I'm looking for a good compromise to add a boost factor in my queries.
I generate a multi-field querie with multiples terms and I want to set a
specific boost factor for each fields.
ex:
query = name:( john steve bob ) AND type:( client boss ) AND position:(
first last second )
My objective is to set a boost factor for the name field and another one
for the position. But the following syntax is not valid:
query = name:( john steve bob )^2 AND type:( client boss ) AND
position:( first last second )^0.5
So, I see a solution (but not very elegant) by splitting all the terms
and add the same boost factor for each, like:
query = (name:john^2 OR name:steve^2 OR name:bob^2) AND type.....
But with this method, my query will be very long, and should be very
painfull to process for the search engine (at least, I think).
Somebody have a better idea?
Thanks.
--
----- Olivier Amira -----
WEBMOTION, Ottawa - Canada
olivier.amira@webmotion.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>