Hi Sven, http://www.lucenebook.com/search?query=search+boost+field (hm, I was hoping to find something better)
You can use setBoost at search time: Query class has setBoost(float) method, which you can use if you construct queries in the code, and QueryParser supports ^float syntax, which puts the power in the hands of people entering queries. Otis --- Sven <[EMAIL PROTECTED]> wrote: > > > Hi folks, > > I have a question about boosting fields in a Query. > Suppose we have documents like this in the index: > > fieldA:String fieldB:String fieldC:Date fieldD:Number > > And the query is like that: > > fieldA: wordA1 wordA2 wordA3 wordA4 > fieldB: wordB1 wordB2 wordB3 wordB4 > fieldC:[date1 to date2] > fieldD:[number1 to number2] > > > Now what I want to do is to boost certain fields, for example the > fieldA > of the query should be boosted by a factor of 2. > What is the most elegant way to do that? > > btw. boosting document fields doesnt help as different users should > be > able to boost different fields.... > > > Thanks, > Sven > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]