Magento offers different options to configure the catalog search. Which search type and which search operator you choose has a great influence on search results, especially when your search phrase consists of multiple words. When all options describend below are exhausted, third party extensions, such as IntegerNet_Solr, help to further improve your product search.

Combining Search Keywords – an example

Comparing the search request “bedding” and “blue king size bedding”, you recognize that the second search request represents the next level of that searching person’s thought process: Instead of general information on bedding, this person is looking for products which match certain characteristics, i.e. blue colored king size bedding. In general, when it comes to website visitors it’s like this: The more words they put into a search request, the more concrete is their demand. Someone who explicitly searches for “blue king size bedding” wants to find a product that matches all criteria – they don’t want to be distracted by white queen size bedding.
The user’s attention is very valuable. If you waste it on irrelevant search results, you risk your store’s usability and the shopping mood of potential customers. So the aim is to offer a sufficient amount of products for any search request that are relevant matches to the search term.

Search operators to improve product search

At this point the search operator chimes in: it sets the ground rules how words inside a search request are treated. An OR search would offer the aforementioned person matches for each single word: something in king size, some bedding, something blue. Especially general terms such as blue often lead to a great number of matches in product catalogs.
If you use the AND operator instead, that fan of blue textiles for his king sized bed will only see those products which match all words: bedding, blue AND king size.
When site visitors narrow down their search word by word, they expect the AND search operator to be in place. Adding more search results due to an OR search operator can be frustrating, especially when search results are displayed in an unsorted list.

Search Types in Magento

Magento Community Edition’s catalog search, which is based on MySQL, lets you choose between

  • Like
  • Fulltext and
  • Combine

as a search type. All of these kinds of searches use the search operator OR. In order to find the best solution for your store, it’s important to understand what exactly these different search types do.

Configuration of Magento Community Edition catalog search

Configuration of Magento Community Edition catalog search

Magento’s Search Type Like – Flexible Matches

The search type Like operates a search, looking for matches that include the search term somewhere in a searchable place either as a word or as part of a word. When you search for “bed”, the like search type offers e.g. bedding as a search result. Searching for “bed blue”, it offers you all products whose texts include the letter sequence “bed” or “blue”: white beds, blue beds, blue bedding, white bedding, blueprints, blueish products, blues music…
The search results have no ranking. On the first position, there could be a product in which only one of the words has been found while somewhere further down the results page you could spot a product that matches all search keywords. So here users have to search the search results themselves. Meanwhile, their patience and attention dwindle away…
Be careful though! Don’t confuse Like search with fuzzy search. Fuzzy search is able to look for deviations from a search word which comes in handy if you made a typo (e.g. “bed bleu”). A Like search is not able to do that.

The search type Like in Magento examines products whether the search term is contained in a word.

The search type Like in Magento examines products whether the search term is contained in a word.

Magento’s Search Type Fulltext – Sorted Search Results

The Fulltext search scans products for exact matches. Extended words like “blueish” and declined words like “beddings” are not exact matches for the search request “blue bedding” and, therefore, they won’t be shown as part of the results. Even the smallest difference between a search term and a product description will cause Magento’s Fulltext search to ignore a product that a human being would regard as a perfect fit. At least Fulltext search performs a ranking with weighting: if the search request contains several keywords, the search results’ top matches will be those products that match all search keywords – “blue” and “bedding”. They are followed by those products that only match one of the search keywords.

The Fulltext search looks for exact matches to keywords and sorts results: complete matches to all keywords are top results, partial matches fill the following ranks.

The Fulltext search looks for exact matches to keywords and sorts results: complete matches to all keywords are top results, partial matches fill the following ranks.

Magento’s Search Type Combine – Flexible Matches, Sorted Search Results

Combine is a combination of the search types Like and Fulltext. When you search for “blue bed”, it will return all products that include the letter sequences “bed” or “blue”. Just like in a Fulltext search, there is a weighted ranking: the top matches are – if possible – those products which match both letter sequences in their pure form. “blue bed” and “bed blue” would fill in the first ranks, followed by matches of one of the words “bed” and “blue”. Finally, the search results are filled up by “bed*”, “*bed”, “*bed*” and “blue*”, “*blue” and “*blue*” – the asterisk symbolizes further optional letters, e.g. in declined or compound words.

The Combine search type is a combination of Like and Fulltext: it scans for a match of the entered keyword as part of a word in the product. All results are displayed in a weighted ranking, those with more matches are listed first.

The Combine search type is a combination of Like and Fulltext: it scans for a match of the entered keyword as part of a word in the product. All results are displayed in a weighted ranking, those with more matches are listed first.

AND Operator or OR Operator

All MySQL search types in Magento Community Edition – Like, Fulltext and Combine – are executed using the OR search operator. Though the weighted search results of Fulltext and Combine searches help to find a matching product a tad faster, there still is the problem of precise search requests of users – meaning they consist of several words within a search request – which lead to an inflation of the search result list and imprecise search results.
No matter how good your search type is – the higher number of search results caused by the OR search operator requires a lot of your user’s attention.

Integrate AND Operator in Magento Using Extensions

In order to improve Magento’s catalog search and to gain control over the search operator, you can use Magento search extensions. Our module IntegerNet_Solr offers the option to choose between the search operators OR and AND. In almost all use cases, the AND search operator is a better fit for an online store, enabling users with concrete ideas of their ideal product to receive search results that are exactly what they are looking for. At the same time, appropriate search term suggestions help guiding the user to a search request that promises matching products.

Sonja Riesterer

Author: Sonja Riesterer

Sonja Riesterer is the Marketing Manager at integer_net. She especially enjoys organising events. She is a Magento Certified Solution Specialist for Magento 1 and Magento 2 and has been awarded as a Magento Master in the category “Maker” in 2017, 2018 and 2019.

More Information