lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Boost One Term Query
Date Fri, 07 Dec 2007 00:48:12 GMT
I don't believe you can compare scores across queries in any meaningful
way.

This sounds a lot like you're trying to solve some problem and have decided
that boosting and comparing scores across queries is the answer. in other
words, the XY problem.

Perhaps if you explained what you're trying to accomplish someone could
suggest an alternative...

Best
Erick

On Dec 6, 2007 3:12 PM, java_user_ <jkraemer@cs.tufts.edu> wrote:

>
> 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_ <jkraemer@cs.tufts.edu> 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: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >
>
> --
> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message