[Xapian-devel] Need help as Pl2 tests not performing as expected

Olly Betts olly at survex.com
Wed Mar 27 22:39:37 GMT 2013


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



More information about the Xapian-devel mailing list