If I set the boost=0 at query time and the query contains only terms with
boost=0, the scores are NaN (because weight.queryNorm = 1/0 = infinity),
instead of 0.

Peter


On Sun, Mar 1, 2009 at 9:27 PM, Erick Erickson <erickerick...@gmail.com>wrote:

> FWIW, Hossman pointed out that the difference between index and
> query time boosts is that index time boosts on title, for instance,
> express "I care about this document's title more than other documents'
> titles [when it matches]" Query time boosts express "I care about matches
> on the title field more than matches on other fields".
>
> Best
> Erick
>
> On Sun, Mar 1, 2009 at 8:57 PM, Peter Keegan <peterlkee...@gmail.com>
> wrote:
>
> > As suggested, I added a query-time boost of 0.0f to the 'literals' field
> > (with index-time boost still there) and I did get the same scores for
> both
> > queries :)  (there is a subtlety between index-time and query-time
> boosting
> > that I missed.)
> >
> > I also tried disabling the coord factor, but that had no affect on the
> > score, when combined with the above. This seems ok in this example since
> > the
> > the matching terms had boost = 0.
> >
> > Thanks Yonik,
> > Peter
> >
> >
> >
> > On Sat, Feb 28, 2009 at 6:02 PM, Yonik Seeley <
> yo...@lucidimagination.com
> > >wrote:
> >
> > > On Sat, Feb 28, 2009 at 3:02 PM, Peter Keegan <peterlkee...@gmail.com>
> > > wrote:
> > > >> in situations where you  deal with simple query types, and matching
> > > query
> > > > structures, the queryNorm
> > > >> *can* be used to make scores semi-comparable.
> > > >
> > > > Hmm. My example used matching query structures. The only difference
> was
> > a
> > > > single term in a field with zero weight that didn't exist in the
> > matching
> > > > document. But one score was 3X the other.
> > >
> > > But the zero boost was an index-time boost, and the queryNorm takes
> > > into account query-time boosts and idfs.  You might get closer to what
> > > you expect with a query time boost of 0.0f
> > >
> > > The other thing affecting the score is the coord factor - the fact
> > > that fewer of the optional terms matched (1/2) lowers the score.  The
> > > coordination factor can be disabled on any BooleanQuery.
> > >
> > > If you do both of the above, I *think* you would get the same scores
> > > for this specific example.
> > >
> > > -Yonik
> > > http://www.lucidimagination.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> > > For additional commands, e-mail: java-user-h...@lucene.apache.org
> > >
> > >
> >
>

Reply via email to