Jump to content

Bad search results with native search for specific search terms in Prestashop 1.6


prime1974

Recommended Posts

Hi!

We have a problem with the search results in Prestashop 1.6 and bad search results for specific search terms.

 

We observed, that the search results appears to ignore numbers in search terms, which you can observe trying yourself on our website: http://montagetools.de

 

Please feel free to try entering in the search box:

typ 10

typ 12

typ 15

typ 25

typ 30

typ 66

typ 80

 

 

The ajax and result search lists displays products containing the word "typ", but ignores the added numbers in the search term, which leads to results which are not related to the search terms.

Having correct search results is crucial to us, yet that the products we offer very often include number specifications which are important for our clients.

 

Could somebody please help?

Thank you very much.

 

 

Link to comment
Share on other sites

You should increase the Minimum word length (in characters)  to 5 or 6. Standard is 3 and the reason why typ is preferenced = 3 char. Ypu can also play with the reference weigth on the lower block. Go for that on TAB "Preferences -> search"

 

Good Luck !

 

Thank you very much for your suggestion.

 

I tried that immediately and once I set the search word minimum length to 4, 5 or even 6, there is no result for any of the search terms.

 

The system returns then that there are no results for "typ ##".

Link to comment
Share on other sites

the problem seems to be the space between typ and no. the best thing is that you rework your products by eleminating the space between. Prestashop recognizes the space as a new word after it, so word1 word2. And than delvers you all sarch added with typ and nothing cause next word is 10 and does also not mathc to the 5 chars.

Edited by selectshop.at (see edit history)
  • Like 1
Link to comment
Share on other sites

the problem seems to be the space between typ and no. the best thing is that you rework your products by eleminating the space between. Prestashop recognizes the space as a new word after it, so word1 word2. And than delvers you all sarch added with typ and nothing cause next word is 10 and does also not mathc to the 5 chars.

 

Thank you for the technical explanation. Digging deeper into the issue I have found some several year old entry which told something similar. Of course I can change the names of our products, but this will not really resolve my issue, as I am investigating the search behavior of our visitors.

 

This means: If I am targeting to get correct results for the defined search terms as I am asking for, just because our visitors enter the search terms exactly as I mentioned in my problem description. Changing the names into "typ-XX" will help most probably resolve the issue for people who would enter it like "typ-XX" -> but the problem is that nobody enters the search terms with a dash or similar separation characters.

 

Most surprising thing is that the search term highlighting within the ajax search list highlights the term correctly within the list.

Could this even be a bug, smells a bit a like it?

Link to comment
Share on other sites

I understand your problem, but unfortunately there is no technical solution for it. You are having 2 words, prestashop searches by word in this way. The best way is to have only one word. Your customers will learn rapidly the way to search when they type the chars and see the results... This is a way to educate my customer....

 

You can try the other direction: min length 2, but in this case all words with "ty" will apply for this filter. Or set a weight on the words on lower configuration possibility.

 

Dose the type no. have any characteristic ? size, color or other feature ? If yes you can besides the search offer your customers a filter (block layered) for to refine the search. You in this case add to your products attributes (Produkteigenschaften) and summarize them in filteroptions.

  • Like 1
Link to comment
Share on other sites

I understand your problem, but unfortunately there is no technical solution for it. You are having 2 words, prestashop searches by word in this way. The best way is to have only one word. Your customers will learn rapidly the way to search when they type the chars and see the results... This is a way to educate my customer....

 

You can try the other direction: min length 2, but in this case all words with "ty" will apply for this filter. Or set a weight on the words on lower configuration possibility.

 

Dose the type no. have any characteristic ? size, color or other feature ? If yes you can besides the search offer your customers a filter (block layered) for to refine the search. You in this case add to your products attributes (Produkteigenschaften) and summarize them in filteroptions.

 

Thank you so much for your friendly help!

 

Could you tell me where I can find the responsible files for the search? I would like to have a look at it, and maybe write an override for the search function. I am sure this is a manageable problem :)

Link to comment
Share on other sites

/classes search.php

/controllers/front/SearchController.php

(/controllers/admin/AdminSearchConfController.php)

(/controllers/admin/AdminSearchController.php)

 

Thank you! As soon as I think to have found a solution to this - I'll post it here!

Have a good night.

Link to comment
Share on other sites

Thank you! As soon as I think to have found a solution to this - I'll post it here!

Have a good night.

 

Well, I have had a look into the native search engine and it is not really viable to change it much.

 

I finally considered for the moment that the suggested solution is good enough for the moment:

I reduced the search word length to 2 characters and

Set the search to precise word coincidence.

 

Like this the search results are good enough for the moment.

 

For further purposes I think I will have a look into advanced search engines from the prestashop paid modules, which is cheaper than re-programming a lot of stuff and lose a lot of time.

 

Thank you very much again, selectshop.at.

Link to comment
Share on other sites

  • 2 years later...
  • 9 months later...
  • 4 weeks later...

I am having this same issue on PS 1.7.5.1

I can't believe there is not yet an option to select exact phrase search! 

The really puzzling thing is, by setting all search terms except name to 0, the front end still gives rubbish results. (In my case, I am selling model railways and "Class 90" - a type of locomotive, will return "Class" not "Class 90").

However, when I type class 90 into "Name" in the products section of the BO, I get all the Class 90s and nothing else.

If I set Name to 0 weighting, and Tags to 10, then enter "Class 90", Class, 90 or any combo as product tags, it still returns everything with class as a tag (regardless of the number after class).

 

So, why does the BO work but not the customer side (which is more important!)?

 

Does anyone know how to override the search.php to make the search term AND instead of OR?

 

Thanks

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...