[Xapian-devel] Re: document_id globally incrementing
Alexander Lind
malte at webstay.org
Mon Dec 4 19:58:40 GMT 2006
> Docid 0 is invalid - the returned docids should start at 1. Perhaps
> that's what you meant, but I thought I should clarify.
>
Yes, sorry my mistake.
>
>> So instead of having 10 sub-indexes with 50 documents in each,
>> document_id:s ranging from 0-50 in each, I seem to end up with 10
>> sub-indexes with 50 documents in each, document_id:s ranging from 0-49
>> in subindex 1, 50-99 in subindex 2, and so on. This would not be a
>> problem if writabledatabase_add_document() returned these globally
>> incrementing document_id:s, but it doesn't.
>>
>
> When you search over a combination of databases, the document ids are
> simply interleaved to avoid clashes. You can easily reverse the
> formula used:
>
> http://article.gmane.org/gmane.comp.search.xapian.general/1375
>
Good to know. I figured this out after a while. Sorry for spamming down
the mailing list with redundant questions.
> When writing, you're just accessing the docids in a single database. It
> would be feasible to allow writing to multiple database managed by a
> single object, but nobody's yet done the work required to support this.
> There was some discussion of that in this thread:
>
> http://thread.gmane.org/gmane.comp.search.xapian.general/3464
>
I have implemented exactly that in my xapian index class, but its php
only of course. Perhaps something I could submit to the xapian wiki
pages later? Not until I have tested it out a bit more so I know its
stable though.
Thanks
Alec
> Cheers,
> Olly
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.tartarus.org/pipermail/xapian-devel/attachments/20061204/147f6503/attachment.html
More information about the Xapian-devel
mailing list