marco.villegas at dokeos.com
2008-Oct-24 18:07 UTC
[Xapian-discuss] Removing unused terms?
Hi all, I was searching how to remove a term from a Xapian DB on Xapian API[1], but I could not find the right member function on the classes. Is there a way to do that? The main reason I want to do it is cleaning up unused(not associated with documents) terms. Cheers, [1] http://xapian.org/docs/apidoc/html/annotated.html -- Marco Antonio Villegas Vega ( ? - ? ) Ing. Informatica http://blog.pucp.edu.pe/marvil07
On Fri, Oct 24, 2008 at 08:07:20PM +0200, marco.villegas at dokeos.com wrote:> I was searching how to remove a term from a Xapian DB on Xapian API[1], > but I could not find the right member function on the classes. > > Is there a way to do that? > > The main reason I want to do it is cleaning up unused(not associated > with documents) terms.If you remove all documents which contain a term, the term no longer exists in the database. No need for manual clean-up. If you're still seeing such terms when iterating all terms in the database and are using Xapian <= 1.0.7, try upgrading to 1.0.8 - that fixes bug#287 which I suppose might cause such a problem: http://trac.xapian.org/ticket/287 The Debian/Ubuntu packages of 1.0.7 also contain this fix as an extra patch. Cheers, Olly