[Xapian-discuss] Re: Evaluating Xapian

Arne Georg Gleditsch argggh at linpro.no
Mon Jan 24 23:32:35 GMT 2005


* Olly Betts
>> - The documentation I read so far is not very explicit on searching
>> different fields. The way I currently understood it, I simply make the
>> name of the fields I want to support part of the terms I add to the
>> documents?
>
> Pretty much.  Conventionally, the prefix you add should be all uppercase.
> Multi-letter prefixes should start with "X", and for such prefixes
> you need to add a ":" to separate prefix and term if the term itself
> starts with a capital letter.

If I want to add a new meta-tag to an already indexed document, I
naturally do something like this:

    my $doc = $wrdb->get_document($doc_id);
    $doc->add_term('NEW_TAG');

To flush this to the database it seems I then have to do

    $wrdb->replace_document($doc_id, $doc);

but my impression (based on gut feeling only, I admit) is that this is
rather slow.  Is this the right way to do it, and are there more
efficient methods to use when I just want to add a single term like
this?


							Arne.




More information about the Xapian-discuss mailing list