guanooo Posted June 25, 2015 Share Posted June 25, 2015 First, a fact: I'm really tired of discovering bugs and issues in Prestashop (no matter what version, currently I'm speaking for 1.6.0.9). That's for sure!Here it is the current issue: Search Function Doesn't Work Properly When Entering Words In Cyrillic This is the chapter for Search Preferences -> http://doc.prestashop.com/display/PS16/Search+Preferences I set the weight to 0 to 8 of the 10 possible weight fields, e.g. I left only the Products name weight and Reference weight. Then I re-build the entire search index and YES, that's working. When customers make a request using my shop's internal search engine, they may make mistakes in spelling. Yes, that's normal and that's why I want to display the right results to them by using the "alias" feature. Well, I have already entered aliases in Cyrillic and point their right ones.For example:Alias: дражки за мебели, дружки за мебели, дражки за мебли, drajki za mebeliResult: дръжки за мебелиWhen entering one of the alias above and hitting enter or clicking the search button nothing happened. Nothing appears in real time below the input field. The search engine just says: No results were found for your search "дружки за мебели". (or any of the four alias)WHY? How to make this work? Here it is a common theme, but the solution is not clear at all (at least to me it is not) -> https://www.prestashop.com/forums/topic/306778-solved-search-doesnt-work-for-cyrillic-language/?do=findComment&comment=1552456 Link to comment Share on other sites More sharing options...
guanooo Posted July 8, 2015 Author Share Posted July 8, 2015 (edited) Come on people from Prestashop. Don't put me in your other pocket. Give me a straight answer!How to use aliases in Cyrillic for the search function? It's not working! Edited October 8, 2015 by razaro (see edit history) Link to comment Share on other sites More sharing options...
lavalava Posted October 8, 2015 Share Posted October 8, 2015 Hi guanooo, did you find any solution? I imported alias in Cyrillic but they transform in latin; PS 1.6.1.1; Link to comment Share on other sites More sharing options...
guanooo Posted October 8, 2015 Author Share Posted October 8, 2015 (edited) Still not! Next month I'll give the task to my web development crew. We will find a solution because our clients need a working search engine. Not the default corrupted one. Edited October 8, 2015 by guanooo (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted October 8, 2015 Share Posted October 8, 2015 Still not! Next month I'll give the task to my web development crew. We will find a solution because our clients need a working search engine. Not the default corrupted one. I understand how frustrating this might be. If you can not get help (there may not be solution) in community and have bug then to reach ps developers please open a bug report here: http://forge.prestashop.com/secure/Dashboard.jspa then if you would be so kind as to past the bug report link back to this post for others to follow/comment/vote up that would help. Link to comment Share on other sites More sharing options...
helloworlder Posted October 8, 2015 Share Posted October 8, 2015 (edited) The problem is in Search.php -> sanitize() function. When you do index for search, the sanitize function will mess up Cyrillic letters, as it simply does not handle them properly. preg_replace() is used to strip out characters without regard for Cyrillic. Thus the indexation() [sic] function does not break up Cyrillic words correctly. Specifically, this is the offending line: $string = preg_replace('/['.PREG_CLASS_SEARCH_EXCLUDE.']+/u', ' ', $string); I can understand bugs like this on young projects, but Prestashop is over 10 years old, so it's rather spectacular this wasn't discovered earlier. Edited October 8, 2015 by helloworlder (see edit history) 2 Link to comment Share on other sites More sharing options...
Recommended Posts