Jump to content

Recommended Posts

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

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 by DataKick (see edit history)
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...