Ben Phillips
2008-Jul-16 14:52 UTC
[Xapian-discuss] Searching for numbers and roman numerals
We're indexing our game database and want to return Grand Theft Auto IV when someone searches for Grand Theft Auto 4 (and vice versa) - would using synonyms for roman numerals be appropriate here or is there a more appropriate solution? We'd also like to return Grand Theft Auto IV when somebody searches for Grand Theft Auto Four as well. We only need to cope with low values so entering all of these manually as synonyms wouldn't be an issue. Thanks, Ben. -- www.playfire.com - now in public beta!
Matthew Somerville
2008-Jul-21 12:25 UTC
[Xapian-discuss] Searching for numbers and roman numerals
Ben Phillips wrote:> We're indexing our game database and want to return Grand Theft Auto > IV when someone searches for Grand Theft Auto 4 (and vice versa) - > would using synonyms for roman numerals be appropriate here or is > there a more appropriate solution?Synonyms sound good to me. Indexing these four "documents": 'This is a review of Grand Theft Auto 4.', 'This is a review of Grand Theft Auto IV.', 'This is a review of Grand Theft Auto Four.', 'This is a review of Grand Theft Auto 4, known as GTA IV.', and synonymising all of "four", "iv", and "4" to each other (so 6 calls to add_synonym) means all four entries are returned for a search of any of the three ways of saying 4 with FLAG_AUTO_SYNONYMS set. ATB, Matthew