[Xapian-discuss] 100% relevant
Francis Irving
francis at flourish.org
Sat Aug 21 23:21:39 BST 2004
On Thu, Aug 19, 2004 at 12:39:05PM +0100, Olly Betts wrote:
> On Wed, Aug 18, 2004 at 12:35:53PM +0100, Olly Betts wrote:
> > On Wed, Aug 18, 2004 at 12:04:10PM +0100, Francis Irving wrote:
> > > $ ~/src/xapian-examples-0.8.1/delve ~/scratch/testxapdb/ 'treatment OR centre'
> > > Error opening database: Couldn't detect type of database
> >
> > delve doesn't run queries - it's trying to open a database called
> > 'treatment OR centre'. If you want to try queries, run quest.
> >
> > It'd be more helpful if it included the database name in that error
> > message...
>
> I've now fixed delve to report the database name if it can't be opened,
> which would have avoided some confusion here.
>
> Any further progress on this?
Right, just had another go at this with some progress. OK, things I've confirmed...
- It happens when I index and search on the server, but not on my
laptop. There's some kind of configuration issue on the server,
probably introduced when we upgraded from Xapian 0.8.0 to 0.8.1.
- Quest (much more useful than delve :) gives the same results as
our own querying perl script (when I've picked words which
stem to themselves...). This is on both server and my laptop.
So either the database is being written in a corrupt way by the Perl
Xapian bindings, or the Xapian C++ library is behaving badly.
- Copying a database made on the server to the laptop, and it reads
incorrectly on the laptop. So something is definitely going wrong
when making the database. Which means the Perl bindings.
Some playing with ldd to show library dependencies on baked:
baked:~/scratch$ ldd ~/src/xapian-examples-0.8.1/quest
/home/fawkes/src/xapian-examples-0.8.1/quest:
libxapianqueryparser.so.3 => /usr/local/lib/libxapianqueryparser.so.3 (0x2806b000)
libxapian.so.3 => /usr/local/lib/libxapian.so.3 (0x28082000)
libstdc++.so.3 => /usr/lib/libstdc++.so.3 (0x28260000)
libm.so.2 => /usr/lib/libm.so.2 (0x282a5000)
libc.so.4 => /usr/lib/libc.so.4 (0x282c0000)
baked:~/scratch$ ldd /usr/local/lib/perl5/site_perl/5.8.2/mach/auto/Search/Xapian/Xapian.so
/usr/local/lib/perl5/site_perl/5.8.2/mach/auto/Search/Xapian/Xapian.so:
libxapian.so.2 => /usr/local/lib/libxapian.so.2 (0x28143000)
libstdc++.so.3 => /usr/lib/libstdc++.so.3 (0x2832e000)
libm.so.2 => /usr/lib/libm.so.2 (0x28373000)
baked:~/scratch$ ls -l /usr/local/lib/libxapian.*
-rw-r--r-- 1 root wheel 44079722 Jul 7 12:46 /usr/local/lib/libxapian.a
-rwxr-xr-x 1 root wheel 798 Jul 7 12:46 /usr/local/lib/libxapian.la
lrwxr-xr-x 1 root wheel 14 Jul 7 12:46 /usr/local/lib/libxapian.so -> libxapian.so.3
-rwxr-xr-x 1 root wheel 23671653 May 13 15:06 /usr/local/lib/libxapian.so.2
-rwxr-xr-x 1 root wheel 23439618 Jul 7 12:46 /usr/local/lib/libxapian.so.3
Aha! The Perl binding is using a different version of Xapian to other stuff.
Did the so number (so.2, so.3 etc.) change between 0.8.0 and 0.8.1, or some
other time? Does this explain the symptoms I'm seeing?
I will pester somebody with root on the server to fix this up.
I think this is also a bug in Xapian. One version shouldn't be able to read a
database made in another version and it appear corrupt. It should give an
"incompatible version" error.
Francis
More information about the Xapian-discuss
mailing list