Forum Moderators: open

Message Too Old, No Replies

Mysql Full text search for arabic

Is there a solution for it to work?

         

smagdy

7:31 pm on Jan 11, 2007 (gmt 0)

10+ Year Member



Hello,

I am using Mysql Full text index on text field so users can search the site, but the problem is that they could search by arabic words and that doesnt work because its Multibyte, so is there a solution for that? or its just that i have to detect.....

if the search string contains 1 or more arabic letter
use SELECT * FROM `announce` WHERE `adtext` like '%ΚΡίνΘ%'
else
use SELECT * FROM `announce` WHERE MATCH(adtext) AGAINST('eng_word')

if i there is no solution other than detecting arabic letters, then please somebody tell me how to do that in PHP?

Thanks in advance

smagdy

10:28 am on Jan 12, 2007 (gmt 0)

10+ Year Member



Hello,

I have these 2 select statments, when i use the first it does full table scan and when i use the 2nd it just use the full text index search so i goes through just 1 row to get the results...

So is there a way to make the first also use the full text index search?

SELECT ad_id FROM announce MATCH(adtext) AGAINST('hello') OR MATCH(title) AGAINST('hello')

SELECT ad_id FROM announce MATCH(adtext) AGAINST('hello')

Thanks in advance