• Log in or Create an account

Search is one of the more important features in any webshop and website. Almost every visitor uses it while accessing your shop and visitors who use the search mechanism also have higher chances of turning into real customers. That is, if a visitor is searching for something then that means they know what they want to buy and are out there looking for it. We believe the site navigation is useful for the casual visitors but search mechanism is the most important feature for a focussed/determined visitor.
Your site navigation and search mechanism should always be perfectly working. Customers should be able to reach their desired products as quickly as possible.

Fortunately, Magento offers you the ability to fine-tune your webshop search mechanism. We are going to talk about standard search mechanism available in Magento open source 2.X in this blog post.

In standard configurations, Magento OS 2.X uses only MySQL as its search engine. You can find the search settings at backend > Stores > Configuration > Catalog > Catalog > Catalog search:

Magento 2.x search

- Minimal Query Length: From this field you can manage minimum number of characters that are required to activate the search mechanism. For example, if you add '3' here then Magento search will get activated only if a visitor has entered atleast 3 characters in their search query.
- Maximum Query Length: From this field you can manage maximum number of characters that can be entered in the search field. You can leave it as default value or you can even decrease this value as per your liking.
- Search Engine: Magento Open source has only one option here, so keep 'MySQL' selected.

Magento search relies on product text attributes to show appropriate results. You need to make sure that required product attributes are configured to be used in search. You can do this from back-end > Stores > Attributes > Products > Open the attribute you want to use in search > store front properties:

Magento 2 search settings

- Use in search: Select 'Yes here' if you want this particular product attribute to be used by search mechanism.
- Search weight: The priority given to attribute values in search results depends on the search weight configuration., which is situated at Stores → Attributes → Product, as well as the Use in Search setting
- Visible in advanced search: If you want to use this particular product attribute in advanced search as well then you can select 'Yes' here.

We suggest you use product name, short description and long description product attributes for search. You can also use other product attributes that hold important product details.
Also, don't forget to mark your product visibility as 'Catalog, Search', otherwise they will not show up in search results. You have to do this at individual product level in Magento backend.

Doing these things will make your Magento webshop use the standard search mechanism optimally. The standard search mechanism is enough for any small and simple Magento webshop.
However, if you have a big catalog and/or want faster search results on your webshop then here are a few options for improving search mechanism in your Magento Open Source 2.X webshop:

1. You can edit and experiment with the weight given to various product attributes. This is the simplest option, but can take a bit of trial and error to tweak it to get a better result. However, the quality of the search will still be limited by the fact that this is a basic search engine.
For example, you might need to give more weight/importance to product names than product description.

2. ElasticSearch: This is an option recommended by Magento and it is even part of Magento Commerce edition. It is the best option, but also the one that will require the most effort from your development team. It will require setup and configuration of the ElasticSearch stack and might require design level changes. You can refer to this link for more details. You also can read more about ElasticSearch here.

3. Sphinx search: This is the middle ground between basic search and ElasticSearch. It is simpler to set-up, and can be easily connected to with the use of extensions like Mirasvit search extension.

4. External search services: This is another option that is much cheaper in the beginning, but could involve recurring costs in the long run. You can implement an external search result service on your site. All you have to do is install an extension and make minor modifications and it will be up and running. For example: Sooqr search

Feel free to contact Hungersoft for all your Magento development and support requirements.

Copyright © Hungersoft 2019

· Terms & Conditions · Privacy policy