PeterDesouza Posted March 14, 2017 Share Posted March 14, 2017 Hi, I am using prestashop 1.6 latest version. I have a product name "Lengermann + Trieschmann L+T". I have issue in search. when I search by product full name then I got the result but when I use "L+T" only for search I got 'No results were found for your search "L+T"'. I want search result by using "L+T" search string. Anyone please guide me how to achieve this. Thanks in advance. Link to comment Share on other sites More sharing options...
DataKick Posted March 14, 2017 Share Posted March 14, 2017 (edited) Unfortunately that will not work. Search in PrestaShop is not fulltext based. Instead, text is split into words and these are stored in special index. When you perform search, prestashop again split search query into words and do search against index. + character is not considered as part of a word, thus your product name "Lengermann + Trieschmann L+T" is results in 4 words. And because there is default minimal length requirement = 3 chars, only 2 of these words are indexed. Edited March 14, 2017 by DataKick (see edit history) Link to comment Share on other sites More sharing options...
PeterDesouza Posted March 14, 2017 Author Share Posted March 14, 2017 Unfortunately that will not work. Search in PrestaShop is not fulltext based. Instead, text is split into words and these are stored in special index. When you perform search, prestashop again split search query into words and do search against index. + character is not considered as part of a word, thus your product name "Lengermann + Trieschmann L+T" is results in 4 words. And because there is default minimal length requirement = 3 chars, only 2 of these words are indexed. Thanks for your reply. I checked find function of search class. When I print_r the $words I get 2 words i.e. l and t. Is there any way to consider "l+t" as a single word and it will meat min 3 char word length? Link to comment Share on other sites More sharing options...
PeterDesouza Posted March 14, 2017 Author Share Posted March 14, 2017 Hello Vekia, Can you please look into this issue? Thanks Link to comment Share on other sites More sharing options...
DataKick Posted March 14, 2017 Share Posted March 14, 2017 Thanks for your reply. I checked find function of search class. When I print_r the $words I get 2 words i.e. l and t. Is there any way to consider "l+t" as a single word and it will meat min 3 char word length? Sure, you can modify SearchCore::sanitize method and pass any string you deem fit. That could cause some strange errors in other parts of the system, though Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now