I was hoping to boost the entire query to give the query more weight compared
to other queries.
Instead of boosting my entire query, I may just multiply the resulting score
by the weight (or something like that).
Yonik Seeley wrote:
>
> On Dec 6, 2007 2:31 PM, java_user_ <[EMAIL PROTECTED]> wrote:
>> Thanks for the response Hoss.
>>
>> The score I receive is from the Explaination object. The score stays the
>> same regardless of how I boost the single term.
>>
>> The score of the query:
>> apple
>>
>> Is the same as the score of the query:
>> apple^3
>
> This boosts apple 3 times in relation to the other query clauses. If
> there are no other query clauses, it's a bit meaningless.
>
>> I am surprised by the result of the test. Would you expect "apple" and
>> "apple^3" to receive the same score?
>
> Lucene does some "weighting" of the query that causes this to happen.
>
> class Query { [...]
> /** Expert: Constructs and initializes a Weight for a top-level query.
> */
> public Weight weight(Searcher searcher)
> throws IOException {
> Query query = searcher.rewrite(this);
> Weight weight = query.createWeight(searcher);
> float sum = weight.sumOfSquaredWeights();
> float norm = getSimilarity(searcher).queryNorm(sum);
> weight.normalize(norm);
> return weight;
> }
>
> Are you simply curious about this, or is it causing you a problem somehow?
>
> -Yonik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Boost-One-Term-Query-tf4900128.html#a14200211
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]