I collected the statistics using delve and than calculated the weight I
should get using the formula given in Terrier and copy pasted the expected
weight here.:)


On Sat, Jun 22, 2013 at 10:25 PM, Dan Colish <notifications@github.com>wrote:

> In xapian-core/tests/api_weight.cc:
>
> > +
> > +    return true;
> > +}
> > +
> > +//Feature test
> > +DEFINE_TESTCASE(bb2weight3, backend) {
> > +    Xapian::Database db = get_database("apitest_simpledata");
> > +    Xapian::Enquire enquire(db);
> > +    enquire.set_query(Xapian::Query("paragraph"));
> > +    Xapian::MSet mset;
> > +
> > +    enquire.set_weighting_scheme(Xapian::BB2Weight(2.0));
> > +    mset = enquire.get_mset(0, 10);
> > +    TEST_EQUAL(mset.size(), 5);
> > +    // The third document in the database has the highest weight and is the first in the mset.
> > +    TEST_EQUAL_DOUBLE(mset[0].get_weight(), 1.6823696969784483);
>
> How did you determine this is the correct value?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/xapian/xapian/pull/15/files#r4831302>
> .
>