[Xapian-devel] Need help as Pl2 tests not performing as expected
aarsh shah
aarshkshah1992 at gmail.com
Thu Mar 28 01:59:19 GMT 2013
Ill have a look at database statistics.
But interestingly, I just removed the collection frequency statistic(which
will be constant for one term) from all the formula and substituted it with
1. All the tests passed and max possible was now greater than max attained.
So,I'm sure that the problem is with the collection frequency statistic.As
Olly had correctly predicted,adding a new map to weight::internal didn't
work.
I talked to Gaurav Arora about when he will be merging his code and he said
he'll be doing it pretty soon.So yeah,I think the tests will work well
after I use his code to obtain the collection frequency.
-Regards
-Aarsh
On Thu, Mar 28, 2013 at 4:09 AM, Olly Betts <olly at survex.com> wrote:
> On Wed, Mar 27, 2013 at 07:44:49PM +0530, aarsh shah wrote:
> > Hello guys. I just ran the updated tests for PL2 and they are not giving
> > the mset order I expect.Now,the thing is, dfr's behavior is a bit hard to
> > predict and so even if I expect a particular order ,it may give another
> > order and still be correct.So,the only way to write correct tests for PL2
> > is to manually calculate the weight of the documents to decide the
> expected
> > order.
>
> That makes sense.
>
> > For that,I need to have a look at the statistics stored in the
> > database for my tests.I ran the tests and after it failed ,I tried "delve
> > db" at the terminal,but it says that it can't open the database.Please
> can
> > someone help me this.
>
> "db" is just the variable name, not the path on disk.
>
> The databases used for the tests are stored in subdirectories of the
> tests/ directory. The names start with a dot, so are hidden by
> default in "ls", but "ls -a" will show them.
>
> So look in .brass and you'll see all the cached databases in brass
> format.
>
> I'd guess you want something like .brass/db=apitest_dfr - one easy way
> to be sure which you want is to wipe them all and then run just the
> testcase you want the database for - then there should only be one
> database there - for example:
>
> rm -rf .brass
> ./apitest -b brass dfr_pl2weight4
> ls -l .brass
>
> > Also,the *max possible *statistic of the Mset *is less than max
> > attained*and so ,Ill have to have a look at the code again.
>
> I think that would probably happen if you're returning a value above the
> upper bound you gave.
>
> Cheers,
> Olly
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20130328/78e9e25d/attachment.htm>
More information about the Xapian-devel
mailing list