Jump to content

Searching result is not accurate. Can anyone help?


Recommended Posts

Hi, my website is: http://homedirectltd.co.uk/shop/index.php.

I uploaded some products, and tried the search and the tags function, and found both of them are not working great. For example, if I search keyword "iPhone 3G", or click Tags "iPhone 3G", all the iPhone 3G and 3GS products will come out. But what I want to display is for iPhone 3G products only.

 

I edited the Search preference in BO, and increased the weight of product name or Tag, but it made  no difference. 

 

I wonder, is it possible to edit the code? so that search result is precise and accurate? After all, iPhone 3G products are totally different from that of iPhone 3GS. For example, if I search "iPhone 3G", I don't want to show any iPhone 3GS products.

 

Any help would be highly appreciated.

Link to comment
Share on other sites

Hi, did your rebuild index with new products?

 

12.27.2013-12.43.png

http://screencast.com/t/X3FOgOsuwC

Thanks El Patron, yes, I did rebuild the entire index, but it made no difference. If I search for "iPhone 3G", The search result still displays all the products for iPhone 3G and 3GS.

 

I think the reason why iPhone 3GS products are displayed is simply because iPhone 3GS also has the keyword "iPhone 3G". I wonder, is it possible to make the search result more precise? Something like putting double quotation marks " " in google search. In eBay, for example, if you search for "iPhone 3G screen", it won't display any products for iPhone 3GS. I don't know if it is possible in Prestashop?

  • Like 1
Link to comment
Share on other sites

Hi tonisky, you can use quotes, but it won't help in your example with the iPhones. Have a look at this thread:

http://www.prestashop.com/forums/topic/260715-prestashop-seach-only-giving-exact-match-results

As far as I can see, there's no functionality to exclude certain search results like Google, e.g. by entering something like:

"iPhone 3G" -"iPhone 3GS"

Prestashop will strip out the minus sign and return all products where the associated data contains a text string starting with "iPhone 3G" and a text string starting with "iPhone 3GS". In other words, it will just return the iPhone 3GS products - not the intention!

 

However, inspired by PascalVG, I've just had a little play and removed the % from lines 192/193/197 in \classes\search.php (line nos. are for version 1.5.4.1) and that might do the exact search match you're looking for. You would have to put the complete search term in every time to get any results, though.

Cheers, Dave

Link to comment
Share on other sites

Hi tonisky, you can use quotes, but it won't help in your example with the iPhones. Have a look at this thread:

http://www.prestashop.com/forums/topic/260715-prestashop-seach-only-giving-exact-match-results

As far as I can see, there's no functionality to exclude certain search results like Google, e.g. by entering something like:

"iPhone 3G" -"iPhone 3GS"

Prestashop will strip out the minus sign and return all products where the associated data contains a text string starting with "iPhone 3G" and a text string starting with "iPhone 3GS". In other words, it will just return the iPhone 3GS products - not the intention!

 

However, inspired by PascalVG, I've just had a little play and removed the % from lines 192/193/197 in \classes\search.php (line nos. are for version 1.5.4.1) and that might do the exact search match you're looking for. You would have to put the complete search term in every time to get any results, though.

Cheers, Dave

Hi Dave, thanks for your idea. I tried that (removed the three % in the corresponding positions you mentioned). Unfortunately, it didn't help either. It doesn't matter if I entered the complete search term or just "iPhone 3G screen", all 3GS products will come out as well. What made it worse is that, the iPhone 3GS products will be displayed above iPhone 3G products.

 

The eBay search engine is really good, if you entered "iPhone 3G screen", it will only tell you iPhone 3G products, and won't display any 3GS ones (unless that product's title includes both "3G" & "3GS" keywords). Don't know if you have any other suggestions?

 

Cheers, 

 

Tony

Edited by tonisky (see edit history)
Link to comment
Share on other sites

Hi Tony,

The search on your site is still behaving like standard Prestashop. Did you change the live version of search.php or a test version to use the 'exact' search?

Also, you will need to set your minimum search word length to 2. If it's currently the default of 3, '3G' will be excluded from any search.

I've added iPhone 3G and iPhone 3GS to my test products to check - using the exact search seems to meet your requirements.

Thanks, Dave

Link to comment
Share on other sites

×
×
  • Create New...