[Xapian-devel] Apply new format for doclen chunk
Olly Betts
olly at survex.com
Tue May 27 06:52:54 BST 2014
On Tue, May 27, 2014 at 10:35:15AM +0800, Hurricane Tong wrote:
> I am trying to apply new format for doclen chunk.
>
> In class BrassPostList,
> I am going to add a bool variable is_doclen_chunk,
> In each function of BrassPostList, I deal with the condition when
> is_doclen_chunk is true.
> Of course some functions don't need changing.
That's probably OK for now. I think the two cases are likely to end up
sufficiently different that it would make more sense to have a subclass
of BrassPostList specific to doclengths (e.g. BrassDocLenPostList), but
it's hard to really know.
> And in class BrassPostListTable,
> get_doclength and document_exists don't need changing.
> I am going to rewrite merge_doclen_changes.
OK.
> I also need to modify get_chunk, dealing with the case when the
> parameter tname is empty.
Or perhaps have a separate function if the code isn't at all similar
now.
> In this way, it seems I just need to modify brass_postlist.h and
> brass_postlist.cc.
> Is my understanding correct?
That sounds plausible. Certainly the changes should be confined to the
brass backend.
Cheers,
Olly
More information about the Xapian-devel
mailing list