[Xapian-devel] Some Questions From the beginner of Xapian
Richard Boulton
richard at lemurconsulting.com
Tue Sep 16 10:56:24 BST 2008
liminghit wrote:
> (1) I see the Xapian::Document has a method
>
> * void add_value (Xapian::valueno valueno, const std::string &value)*
>
> What's the purpose of this method? Document will related to the
> terms, but what's the purpose of this?
Values are extra pieces of information which can be used during the
search to modify the search in some way. For example, they can be used
to add an extra weight to some documents, or to sort the results in a
different order, or to collapse results from a single website.
> (2) add_posting method will add term to a documents.
>
> * void add_posting (const std::string &tname, Xapian::termpos tpos,
> Xapian::termcount wdfinc=1)*
>
> I noticed that
>
> Xapian::TermGenerator has follow method
>
> * void index_text (const Xapian::Utf8Iterator &itor, Xapian::termcount
> weight=1, const std::string &prefix="")*
>
> What's the differences and relationship between these two functions?
I've just added a FAQ which should answer this.
http://trac.xapian.org/wiki/FAQ/TermGenerator
--
Richard
More information about the Xapian-devel
mailing list