View Single Post

  #6 (permalink)  
Old 03-08-2008
Tigger
 
Posts: n/a
Default Re: keyword search methodology

"henribaeyens" <contact@myname.com> wrote in message
news:47cfddf3$0$897$ba4acef3@news.orange.fr...
> Hello,
>
> I'd like some input on the following:
>
> I have a table on which I will need to perform keyword searches. To make
> it short, the search is performed on three fields:
>
> TABLE QandR
> question which is varchar
> answer which is text
> keywords which is varchar
>
> All data is in French and I need to account for accent insensitive
> searches. So far I'm using the LIKE %kw% form but I'm considering using
> fulltext. So, my idea is this: create a separate table (QandR_search)
> that will hold two fields, an integer id, and a text. So each time the
> QandR table is updated, by feeding it a question, an answer, and
> keywords, I shall take those three, strip them from accents, concatenate
> the whole thing into one big string that I'll insert into the
> QandR_search table. When a keyword is searched for, it is first de-
> accented and then fulltext searched against the text. When there's a
> match, I use the id to point to the QandR table and then echo out the
> original question along with it's answer. Does this sound like a viable
> way of doing accent-insensitive fulltext searches?
>
> Thank you


I do something similar to cope with hyphenated words. e.g. "first-last"

My searchable string would contain "first last firstlast" to cover all
bases.

It works well. Especially with one client who has complex hyphenated product
codes which he can now search on.

Another bonus is that you only have to index and search a single field,
which should be faster.

Tigger


Reply With Quote