[Xapian-discuss] Merge databases

Pierre-Alain Moellic pamoellic at gmail.com
Tue Apr 19 15:14:51 BST 2011


Dear all,

I try to use the xapian-compact tool to merge several databases. I need to
keep the document ID.
The problem is that xapian-compact is not able to merge databases because of
overlapping "doc ID range". Nevertheless, in my case, a doc ID is always
used for one and only one database.

Is there a (other) clever way to simply and quickly merge databases ?

Regards

2011/3/7 Pierre-Alain Moellic <pamoellic at gmail.com>

> Hello,
>
> I have a problem when trying to define a query and setting for each term
> its "term frequency" with the classical constructor Xapian::Query<http://xapian.org/docs/apidoc/html/classXapian_1_1Query.html#f396e213df0d8bcffa473a75ebf228d6>(const std::string &tname_,
> Xapian::termcount<http://xapian.org/docs/apidoc/html/namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb>wqf_=1,
> Xapian::termpos<http://xapian.org/docs/apidoc/html/namespaceXapian.html#e5a16f073d0c8ed54085a9de07248d45>pos_=0) :
>
>     Xapian::Query query_test(Xapian::Query::OP_OR, Xapian::Query("Bonjour",
> 10), Xapian::Query("Hello", 5));
>     Xapian::TermIterator qt = query_test.get_terms_begin();
>     while (qt != query_test.get_terms_end())
>     {
>       cout<<*qt<<" "<<qt.get_wdf()<<" ";
>       qt++;
>     }
>
> returns : Bonjour 1 Hello 1
>
> I don't understand why get_wdf returns "1" and not Bonjour 10 Hello 5 ?
>
> Regards,
>
> pa.
>
>
>


More information about the Xapian-discuss mailing list