Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento ‘OR’ wildcard style search by default and other search enhancements
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

Is there a setting that allows magento’s search to perform like a keyword search, i.e. ‘OR’ search instead of exact string searching?

For example, the search “big wooden bat” will turn up my product if listed as exactly a “big wooden bat” however I want the search term “big bat” or “bat big” to also pull it up.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

Also how about listing the attibutes on the left under ‘Shopping Options’ when listing the search results.. much like when entering a category which is an ‘anchor’.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tjscgroup
Sr. Member
 
Avatar
Total Posts:  146
Joined:  2008-09-24
United Kingdom
 

According to July 2007 Magento had/s plans for the search, see this blog post.  Not sure if any of these plans have been actioned yet.

I also see “Enterprise Search” on the roadmap...whatever that is!!  Perhaps you like this idea on improving the roadmap.

Overall, I would say that search functionality is good, but I agree it could be improved.

I would recommend though following Google’s format, which I believe is the same as Magento i.e. uses “AND” as the default, see: Google help section for more information.

However that is not to say the advanced search should not include an “OR” option.  Perhaps even allow “OR” to be used in the basic search...just stick to “AND” as default.  For example:
apple pear = apple AND pear
apple and pear = apple AND pear
apple or pear = apple OR pear

I could waffle on for ages here, but I wont, I shall just copy and paste my current websites search help info:

Keywords may be separated by AND and/or OR statements for greater control of the search results.

For example, apple AND orange would generate a result set that contain both words. However, for apple OR orange, the result set returned would contain both or either words.

Exact matches can be searched for by enclosing keywords in double-quotes.

For example, “english apple” would generate a result set which match the exact string.

Brackets can be used for further control on the result set.

For example, orange AND (lemon OR banana OR “english apple").

Many thanks in anticipation

Toby

 
Magento Community Magento Community
Magento Community
Magento Community
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

AND is fine and you could be right that it is the best option, but the ability to control this would be good.

However, the sequence of each token (keyword) should not be absolute.

i.e. If I search for ‘big cat’ or ‘fat cat’ it should find it in a product with the title ‘big fat fluffy cat’ and not state that there are no such products.

This imho is a crucial missing feature, as at present customers are searching for products and the search tool is returning no products when they are very present in the store.

I’ve got coding experience but very little PHP.. if someone points me to the search function files I could have a crack at using the PHP tokenizer to achieve this functionality. No guarantees as I have very little available time, but as stated, this is an essential feature which is limiting sales!

 
Magento Community Magento Community
Magento Community
Magento Community
 
tjscgroup
Sr. Member
 
Avatar
Total Posts:  146
Joined:  2008-09-24
United Kingdom
 

This extension will not solve everything but it is a step in the right direction.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

Wicked, that will solve the core gripe I had.. I notice the module states; ‘Last Updated Wed, September 3, 2008 ‘.
Appears this is a very new module, thank god it exists!

Varien, please upgrade the search feature!

Excellent find, tjscgroup. Items not showing up in searches is a ridiculous shortcoming,

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mike_Caisey
Jr. Member
 
Total Posts:  1
Joined:  2008-11-07
 

I’ve had the same issue with the enhanced_search extension.  I changed the PHP code on line 130 in file app/code/core/Mage/CatalogSearch/Model/Mysql4/Search/Collection.php from:

$parts implode(' AND '$parts);

to

$parts implode(' OR '$parts);

this gave me search results using OR logic.

Also, move the Collection.php file to app/code/community/Mage/CatalogSearch/Model/Mysql4/Search/Collection.php. So you don’t have to change the Magento core code.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nernst84
Jr. Member
 
Total Posts:  5
Joined:  2011-09-19
 

Hello! Sorry for question but i’m searching much much more but i not find nothing.. I want on my website search entire and exact string that i type for example if i type “BOX 400 LITRI” magenta default setting search return to me every things that have “BOX” “400” or “LITRI” but if i want to return only object that have “BOX 400 LITRI”, how i can do??

Im think a difference with operator OR AND..

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mirasvit
Guru
 
Avatar
Total Posts:  639
Joined:  2009-08-22
 

Hi! It is possible that you need something like this extension Advanced Sphinx Search Pro http://mirasvit.com/magento-extensions/magento-sphinx-search.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
ec0mmerce
Sr. Member
 
Avatar
Total Posts:  242
Joined:  2013-01-17
 

Hi

You can try this SEARCH AUTO COMPLETE extension which improves search functionality as well as customers’ shopping experience.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top