[Xapian-devel] omindex and scriptindex question

info at bannershift.com info at bannershift.com
Thu Mar 31 15:29:20 BST 2005


Hi,

I was researching indexing of text in omindex and scriptindex.

While indexing text with omindex.cc possition of terms is saved with gap.
This is not happening with scriptindex.cc
While this is happening ?

Another question is why in omindex.cc the term possition starts with 0 while
in scriptindex it starts from 1 ?

Code snippet from omindex.cc

    // Add postings for terms to the document
    Xapian::termpos pos = 1;
    pos = index_text(title, newdocument, stemmer, pos);
    pos = index_text(dump, newdocument, stemmer, pos + 100);
    pos = index_text(keywords, newdocument, stemmer, pos + 100);

Code snippet from scriptindex.cc

Xapian::termpos wordcount = 0;
...........
for (i = v.begin(); i != v.end(); ++i) {
......................
case Action::INDEX:
    wordcount = index_text(value, doc, stemmer, weight,
                i->get_string_arg(), wordcount);
break;





More information about the Xapian-devel mailing list