[Xapian-discuss] a strange type of alias/expanded term

Andreas Marienborg andreas at startsiden.no
Thu Oct 16 12:03:34 BST 2008


On Oct 16, 2008, at 5:32 AM, Olly Betts wrote:
>
> Untested, but try something like:
>
>    # Only need to do this once per day...
>    $db->clear_synonyms("today");
>    $db->add_synonym("today", "D20081013");
>
>    $qp->set_database($db);
>    my $q = $qp->parse_query($query_string,
> 	    FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHATE|FLAG_AUTO_SYNONYMS);

One question regarding this:

I have pretty persistent db-objects (I usually call reopen on  
exceptions), what happens if another
process changes these synonyms? are they stored in the DB, or just in  
the object-instance? Is a reopen on each search the best approach to  
reread synonyms if the are persisted on disk?


- andreas



More information about the Xapian-discuss mailing list