aarsh shah
2013-Mar-27 14:14 UTC
[Xapian-devel] Need help as Pl2 tests not performing as expected
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.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. 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.This may take some time,as PL2 has a very complex formula and it's a bit hard to understand what's happening where. -Regards -Aarsh On Wed, Mar 27, 2013 at 6:23 PM, aarsh shah <aarshkshah1992 at gmail.com>wrote:> Hello guys.I just realized that Ive not set the weighting scheme to PL2 > in the tests for PL2 and so a default weighting scheme of BM25 is used. I > am extremely sorry for this and am updating the tests by setting the > weighting scheme to PL2. > > -Regards > -Aarsh >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20130327/f610c984/attachment.htm>
Olly Betts
2013-Mar-27 22:39 UTC
[Xapian-devel] Need help as Pl2 tests not performing as expected
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