Couldn't detect type of database

Jim Lynch jim at fayettedigital.com
Thu Sep 20 10:00:45 BST 2018


Hi, Olly,

I have no idea what was going on.  I installed xapian from Ubuntu repos 
and had the issue.  xapian-delve and xapian-check gave me the same 
errors.  I've now build the libs and perl bindings from source and all 
is well.  I do not know, but I'm happy it's working again.

Thanks,
Jim.
On 09/19/2018 04:23 PM, Olly Betts wrote:
> On Wed, Sep 19, 2018 at 07:29:13AM -0400, Jim Lynch wrote:
>> I recently lost a hard drive and after successfully restoring everything, I
>> think, I'm getting "Error opening database `current.1':
>> DatabaseOpeningError: Couldn't detect type of database"
>>
>> The directory current.1 contains the following files:
>>
>> -rw-rw-r-- 1 jwl jwl  30064640 Aug 28 23:44 docdata.glass
>> -rw-rw-r-- 1 jwl jwl       151 Aug 28 23:44 iamglass
>> -rw-rw-r-- 1 jwl jwl 767115264 Aug 28 23:44 position.glass
>> -rw-rw-r-- 1 jwl jwl 383213568 Aug 28 23:44 postlist.glass
>> -rw-rw-r-- 1 jwl jwl 203341824 Aug 28 23:44 termlist.glass
>> -rw-rw-r-- 1 jwl jwl         0 Aug 28 23:44 flintlock
> This error just doesn't make sense to me - it should be impossible to
> get it when there's a file "current.1/iamglass", as there is here
> (unless you were running an ancient Xapian from before glass was
> added).
>
> I'd check that the code giving the exception is actually looking at
> the same directory your "ls -l" is.
>
> If you think it is, then I'd try "xapian-delve current.1", and
> if that fails "xapian-check current.1".
>
>> I know that I was using 1.4.1 before, so I reinstalled that version and now
>> delve decided that the db was OK, however when I went to install
>> Xapia./XS/WritableDatabase.xs:30:47: error: missing binary operator before
>> token "("
>>   #if defined XAPIAN_AT_LEAST && XAPIAN_AT_LEAST(1,5,0)
>>                                                 ^
>> ./XS/QueryParser.xs:54:47: error: missing binary operator before token "("
>>   #if defined XAPIAN_AT_LEAST && XAPIAN_AT_LEAST(1,5,0)
>> n::Search from cpan, it gave me errors.
> Unfortunately this construct fails to compile when XAPIAN_AT_LEAST isn't
> defined.  I'll fix uses of it, but meanwhile the simple workaround is to
> use xapian-core 1.4.2 or newer, as the XAPIAN_AT_LEAST macro was added
> in 1.4.2.
>
>> I guess I'll have to upgrade the db to work with a newer version of Xapian
>> somehow.  Is that possible?
> Generally I'd strongly recommend using the latest version from the
> stable release series you're using, i.e. 1.4.7 currently.  Database
> formats and ABI are kept compatible across a release series, and any API
> changes should be upwardly compatible.
>
> Cheers,
>      Olly
>
>



More information about the Xapian-discuss mailing list