[Xapian-discuss] Xapian and Synonyms

Justin Finkelstein justin at redwiredesign.com
Thu Jul 28 17:34:00 BST 2011


Hi guys

I've just had a thought about something we do with our search on
ReportBuyer.com: we cater for both American and British English in our
searches and we have had plans for a while now to implement something
that allows users to find 'colour' and 'color', 'tap' and 'faucet' by
doing some clever programming. 

Looking at the Xapian docs, though, it appears I can do this using
synonyms although the documentation's not clear on how this works (sorry
if this is starting to sound a little annoying). Having dug through the
mailing list, I can surmise that:

    o Synonyms only need to be added to a database once and are
transaction-persistent
    o They're activated by adding the flag FLAG_AUTO_SYNONYMS to the
QueryParser

Which isn't a lot; so what I'd like clarification on is:

    o Are synonyms database-persistent (i.e once added do they stay in
the database until removed)?
    o Are they dual-direction (i.e. if I enter 'tap' or 'faucet' will
both be picked up if a defined synonym is present)?
    o Is there a way to get a list of all current synonyms from a
database? I can't see a way to do this in the API.

If I can get answers to this, I can test it and would be happy to write
this up for the site.

Cheers,

Justin

-- 
Redwire Design Limited
 
54 Maltings Place
169 Tower Bridge Road
London SE1 3LJ
www.redwiredesign.com
 
[ 020 7403 1444 ] - voice
[ 020 7378 8711 ] - fax


More information about the Xapian-discuss mailing list