enkelhandel Posted July 25, 2012 Share Posted July 25, 2012 (edited) I got product 'Lorem ipsum' (same on all languages, as default) and the module Quick search block finds it when the storefront is set to english but not when set to e.g. Swedish. (see attachments) Am I doing something wrong? Edited July 25, 2012 by enkelhandel (see edit history) Link to comment Share on other sites More sharing options...
enkelhandel Posted July 26, 2012 Author Share Posted July 26, 2012 I've been looking more into it. Found the table ps_search_word and only english is indexed even though Swedish is the default language. If this is a bug it is a big one. Link to comment Share on other sites More sharing options...
enkelhandel Posted July 27, 2012 Author Share Posted July 27, 2012 bump Link to comment Share on other sites More sharing options...
fauzanmujahid Posted August 1, 2012 Share Posted August 1, 2012 Yes i have same problem, anyone help??? Link to comment Share on other sites More sharing options...
Suthichai Posted August 2, 2012 Share Posted August 2, 2012 (edited) Since I need to search in Thai which is a non-Latin language, I workaround by changing my_shop\classes\Search.php, llok for define('PREG_CLASS_SEARCH_EXCLUDE', ------------->> around line 31 remove \x{e31}\x{e34}-\x{e3f}\x{e46}-\x{e4f} So that these characters are not excluded (these are Thai vowels). It works for me. Keep in mind that you may have to include different characters than mine. I have not done extensive test, so don't know whether it also work for other languages. I believe that there must be more elegant way of doing this, I am appreciate if someone would enlighten me. Edited August 24, 2012 by Suthichai (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted August 2, 2012 Share Posted August 2, 2012 Thanks for the input guys. We will be working on this and testing. Link to comment Share on other sites More sharing options...
henry88 Posted August 20, 2012 Share Posted August 20, 2012 same issue here. I have English and Chinese. Search is not working at all when I switched to Chinese interface, not even working for searching English words. another question, does the search require at least 3 characters to work? Link to comment Share on other sites More sharing options...
nebojsar Posted August 21, 2012 Share Posted August 21, 2012 Anyone working on this issue? It is a real big problem, would be nice to have some update, is it solved in 1.5.0.15? Link to comment Share on other sites More sharing options...
Suthichai Posted August 24, 2012 Share Posted August 24, 2012 In my case (Thai language), I have to remove from classes/Search.php, around line 41-42 \x{e31}\x{e34}-\x{e3f}\x{e46}-\x{e4f} Reference http://en.wikipedia.org/wiki/List_of_Unicode_characters#Thai I make sure that U+0E01 to U+0E59 are not excluded. I think other non-latin language may be similar, and don't forget to rebuild the index (Preferences > Search > Rebuild Entire Index) Link to comment Share on other sites More sharing options...
igor.i Posted January 20, 2013 Share Posted January 20, 2013 hello @Suthichai if you are able, can you please let me know which charaters to remove from the define('PREG_CLASS_SEARCH_EXCLUDE', for cyrillic letters? i tried to find the according codes via wikipedia, but with no success. (i did rebuild the index, tho). using presta 1.5.3.1 thanks in advance! Link to comment Share on other sites More sharing options...
Suthichai Posted January 21, 2013 Share Posted January 21, 2013 igor.i, As far as I can see, Cyrillic is in the range of U+0400 and U+04FF, and I guess there isn't any that can be excluded in PREG_CLASS_SEARCH_EXCLUDE, except x{482}-\x{489} (which are Thousands Sign and Millions Sign) and it should be excluded any way. So I think (I maybe wrong) nothing can be done here. But I think the $PS_ALLOW_ACCENTED_CHARS_URL may be the cause, try to add the missing record to your database, it might help. See this post for the related issue http://www.prestasho...l-friendly-url/ Add missing field INSERT INTO `ps_configuration` (`id_shop_group`, `id_shop`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, NULL, 'PS_ALLOW_ACCENTED_CHARS_URL', '1', '2013-01-02 00:00:00', '2013-01-02 00:00:00'); Link to comment Share on other sites More sharing options...
lillamy1986 Posted May 17, 2013 Share Posted May 17, 2013 Same problem here. Any solutions ? Link to comment Share on other sites More sharing options...
fong hong Posted December 25, 2014 Share Posted December 25, 2014 Since I need to search in Thai which is a non-Latin language, I workaround by changing my_shop\classes\Search.php, llok for define('PREG_CLASS_SEARCH_EXCLUDE', ------------->> around line 31 remove \x{e31}\x{e34}-\x{e3f}\x{e46}-\x{e4f}So that these characters are not excluded (these are Thai vowels). It works for me. Keep in mind that you may have to include different characters than mine. I have not done extensive test, so don't know whether it also work for other languages. I believe that there must be more elegant way of doing this, I am appreciate if someone would enlighten me. Hi. suthichai what prestashop version do u used ?? i am using 1.5.6.1.. Is it work for me ?? 7zhop Link to comment Share on other sites More sharing options...
fong hong Posted January 8, 2015 Share Posted January 8, 2015 Thanks suthichai Since I need to search in Thai which is a non-Latin language, I workaround by changing my_shop\classes\Search.php,llok for define('PREG_CLASS_SEARCH_EXCLUDE', ------------->> around line 31remove \x{e31}\x{e34}-\x{e3f}\x{e46}-\x{e4f} So that these characters are not excluded (these are Thai vowels).It works for me. Keep in mind that you may have to include different characters than mine.I have not done extensive test, so don't know whether it also work for other languages. I believe that there must be more elegant way of doing this, I am appreciate if someone would enlighten me. i am using 1.5.6.1.. Is it work for me .7zhop Link to comment Share on other sites More sharing options...
pattila01 Posted December 17, 2015 Share Posted December 17, 2015 My solution: http://prestashop.keszites.net/prestashop-1-6-x-hibas-kereso/ Link to comment Share on other sites More sharing options...
Recommended Posts