Hi, 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. And in class BrassPostListTable, get_doclength and document_exists don't need changing. I am going to rewrite merge_doclen_changes. I also need to modify get_chunk, dealing with the case when the parameter tname is empty. In this way, it seems I just need to modify brass_postlist.h and brass_postlist.cc. Is my understanding correct? ------------------ Shangtong Zhang,Second Year Undergraduate, School of Computer Science, Fudan University, China. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20140527/88786702/attachment-0002.html>
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