[Xapian-discuss] problem with multi-database search, xapian 0.9.10

Vasiliy Sergeev vasiliy.sergeev at sibers.com
Mon Feb 18 15:04:32 GMT 2008


Olly Betts wrote:
> On Mon, Feb 18, 2008 at 02:19:09PM +0600, Vasiliy Sergeev wrote:
>   
>> It seems for me that xapian decided to start January and February DBs 
>> from some very close to MAX_INT value.
>>     
>
> I've never seen that happen before, assuming you're not using
> replace_document() to set the document ids.  If you do that, then
> the lowest unused document id will be used when you don't specify.
>
>   
I use replace_document() to update old document with new data for it. I 
have original news and their duplicates. When duplicate comes, I update 
xapian document that is related with original news. So I set exactly the 
same docid that this document had before replacing.
If I understand it right, if I call replace_document(1000000, 
updated_doc) even if docid=1000000 does not exist, xapian will add this 
updated_doc to database with docid=1000000, right? I think this could be 
a cause.

> Is this repeatable?
>
>   
I am not sure about repeating the problem since it appeared only in 2 of 
all databases. Also I am making databases for xapian 1.0.5 on another 
server and this problem have not been appeared.

> By default, xapian-compact will shift docids down to remove any "gap" at
> the start of the numbering.  It doesn't remove gaps between used
> document ids though (that can't be done so cheaply).
>
>   
So if my documents in database have ids like 4227584824, 4227584825, 
4227584826, 4227584827, etc. they will have ids 1,2,3,4, etc...right? if 
so, I think this is exactly what I need to fix broken databases :)

Thanks,
Vaso.



More information about the Xapian-discuss mailing list