Search code examples
replacesphinxsphinxql

Sphinxql Replace() function like mysql


i can able to find search on mysql such as example below;

Record is : I'Histoire Query search :IHistoire

with this sql query i can able find word with ' string.

select kitap_id,kitap_Adi,turu,fiyati,kargo,satici,yazari,yayinevi,yayin_Yili,yayin_Yeri,kucuk_Re sim,kondisyon FROM kitaplar WHERE onay='1' and (REPLACE(kitap_Adi,'''','' ) like '%IHistoire%' OR yazari like '%IHistoire%') order by fiyati asc LIMIT 0,5;

But on sphinx how can i do this? Query below i find matches i want also to find the ones with '.

select kitap_id,kitap_Adi,turu,fiyati,kargo,satici,yazari,yayinevi,yayin_Yili,yayin_Yeri,kucuk_Re sim,kondisyon from test1 where match ('@(kitap_Adi,yazari)(IHistoire)') and onay=1 order by kitap_Adi asc, fiyati asc LIMIT 0,5\G;

How can i do that replace() in sphinxql, i can able to do on mysql side bu how to do on sphinx side?

Thanks


Solution

  • ignore_chars seems to be a perfect fit for this...

    http://sphinxsearch.com/docs/current.html#conf-ignore-chars