Skip to main content
Share Your Experience: Take the 2024 Developer Survey
23 votes
Accepted

Catalog Search indexer process unknown error: There is no such engine: mysql2

Run this query UPDATE core_config_data set value = 'mysql' where path='catalog/search/engine'; And run Following commands php -f bin/magento setup:upgrade php -f bin/magento cache:flush php -f bin/...
Deeps's user avatar
  • 786
14 votes
Accepted

Magento 2: what is the search_request.xml file used for?

Magento 2 provides a declarative way to describe search request which should be executed. search_request.xml is a part of Query API. This declaration describes: What index should be queried What ...
Igor Minyaylo's user avatar
12 votes
Accepted

Magento 2: How to remove "Did you mean" section from search page?

https://docs.magento.com/user-guide/catalog/search-configuration.html#general-search-options You can disable(select no) following both the options, from System Configuration -> Catalog -> ...
Softec's user avatar
  • 2,085
11 votes
Accepted

Magento 1.9.3: every product is displayed in the search in full text mode

Edit: this is not the only 1.9.3.0 bug. See this answer for details and a module that fixes all the bugs: https://magento.stackexchange.com/a/140826/2380 This is a bug. Thanks to IWeb for ...
Raphael at Digital Pianism's user avatar
9 votes
Accepted

How can I add meta noindex to all catalog search result pages in Magento2?

To me you can simply create the following files in your module: view/frontend/layout/catalogsearch_advanced_result.xml view/frontend/layout/catalogsearch_result_index.xml In case of a theme, the ...
Raphael at Digital Pianism's user avatar
9 votes
Accepted

How to disable ElasticSearch using terminal?

⚠️ Since Magento 2.4, ElasticSearch is required and MySQL is not supported as a search engine anymore. You can use the Magento 2 CLI to do it, you can check your current search engine using: php -f ...
Rafael Corrêa Gomes's user avatar
9 votes
Accepted

Magento 2 Change Default OrderBy Parameter for Search Results

Try a below code. Tested in M2.3. This will change the sorting option from Relevance to Price only for Search Result Page. You can change the $defaultSortBy and $directionToSet as per your need. ...
sandip's user avatar
  • 4,004
7 votes

Magento 2: How to use ElasticSearch?

We have been using https://github.com/Smile-SA/elasticsuite with some good success. It does come with some other functionality as well as search but it's well maintained.
Paul's user avatar
  • 1,726
6 votes
Accepted

Searching for SKU without special characters

To make this work for both, the real SKU and the one without -, both have to be added to catalogsearch_result table because SQL-query for search results looks like this: SELECT `s`.`product_id`, 0 AS ...
sv3n's user avatar
  • 11.7k
6 votes

How do I change Magento 2 search from OR logic to AND?

I found the solution , create a file search_request.xml in your module's etc folder , copy the entire node from vendor/Magento/CatalogSearch/etc/search_request.xml and change <queryReference ...
Arun S's user avatar
  • 191
6 votes
Accepted

I faced the error while search any string Magento 2

Please check this query : SELECT search_synonyms.* FROM search_synonyms WHERE (MATCH (synonyms) AGAINST ('9898' IN BOOLEAN MODE)) And give the query in database table search_synonyms ALTER TABLE ...
Payal Patel's user avatar
  • 1,511
6 votes

Magento 2.4 : Missing required argument $engines of Magento\Search\Model\EngineResolver

If you're not interested to use elastic search in magneto 2.4.0 or above version then you can use below mentioned module ("The Default MySQL search engine has been removed from Magento 2.4.0&...
Shafeel Sha's user avatar
  • 1,395
5 votes

Magento 2: what is the search_request.xml file used for?

Looks like it's used to define attributes certain filters should be applied to and then searchable attributes are applied against this XML to configure the searchRequest - see: Magento\CatalogSearch\...
Daniel Kenney's user avatar
5 votes
Accepted

Adding new page to Front end

Problem resides in your layout update xml file, particularly in the following block declaration. <block type="abc_helloworld/index" name="helloworld_any_block" template="helloworld/index.phtml" /&...
Rajeev K Tomy's user avatar
5 votes

How to enable or add layered navigation to search result page in Magento 2

It's tied to the attribute settings: If you need show layered navigation for some attribute then please enable it in backend. Go to stores > attributes > product, find and open needed attribute ...
thdoan's user avatar
  • 728
5 votes
Accepted

Magento 2 - Plugin issue in catalogsearch

Thanks to @fschmengler and reading Magento 2: virtual types plugins I solved using this app/code/vendorName/moduleName/etc/di.xml: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...
WaPoNe's user avatar
  • 1,590
5 votes

Magento 2.x CatalogSearch Undefined Variable($resultPage)

Try adding this to the beggining of your execute method $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE); I would also set the visibility of your variable in the class but ...
Logic4Life's user avatar
5 votes

How to change layout of catalog search page if results are empty

I don't think there's a simple way to achieve your aim. Here's the logic Magento follows when you search for a product: First, when you type your query text into the search form and hit enter, this ...
kookaburra's user avatar
5 votes
Accepted

Mangento 2 search result page sidbar missing

You can find this layout file catalogsearch_result_index.xml in your app/code or app/design directory first. Try to run below command in your CLI that will return all files which named as ...
Kishan Savaliya's user avatar
5 votes
Accepted

Add custom dropdown in mini Search magento 2

Edit "app/design/frontend/Vendor/Theme_Name/Magento_Search/templates/form.mini.phtml" file and add your select field after the input field like below - <div class="control"> <input id="...
Nayem323's user avatar
  • 751
4 votes
Accepted

Magento2: Override layered navigation template

Your xml tags should look like this: <referenceBlock name="block.name"> <action method="setTemplate"> <argument name="template" xsi:type="string">...
Aaron Allen's user avatar
  • 9,009
4 votes
Accepted

How to show simple calatog search form on CMS page?

There is no widget available for this, but pasting the following code into a CMS page or Static Block will allow you to put a search block where you want to have it: <form id="search_mini_form_cms"...
Vladimir Kerkhoff's user avatar
4 votes
Accepted

how to setTemplate for top.search in magento2

Using the arguments tag NB: this method seems to be buggy when this post is written: https://github.com/magento/magento2/issues/3356 <referenceBlock name="top.search"> <arguments> ...
Raphael at Digital Pianism's user avatar
4 votes

Magento 1.9 search not working properly

You gave to select Catalog,Search option in Visibility field. Thats reason new added products are not displaying in search result.
Jarnail S's user avatar
  • 4,697
4 votes
Accepted

programatically search products in magento 2

If you want to search Product programatically, try below code. I used SKU to get Products. Call this in your template file. #File: app/code/Pulsestorm/RepositoryTutorial/Command/Examples.php ...
Rajkumar .E's user avatar
  • 3,570
4 votes

programatically search products in magento 2

Please use the below code, might be useful for you. here i am giving u test script just copy and past in the test script and run the code as shown in the screenshots EX: http://testsite.com/filename....
Nagaraju Kasa's user avatar
4 votes

Magento 2.4 : Missing required argument $engines of Magento\Search\Model\EngineResolver

You need to re-activate the ElasticSearch modules if you have de-activated them. ElasticSearch is required to run Magento 2.4. Edit: From Magento website: "As of Magento 2.4.0, Elasticsearch 7.6....
Aphroz's user avatar
  • 583
4 votes

Elasticsearch Regular Search Returns No Results

Check if you don't have any "not allowed" filterable and searchable product attributes. For Elastic they can have only 'boolean', 'multiselect', 'select', 'price' types, no "text" ...
Edgarth's user avatar
  • 91
3 votes
Accepted

How to search product programatically in magento 2?

For a quick reference, we can take a look: vendor/magento/module-search/Model/ResourceModel/Query/Collection.php public function setQueryFilter($query) { ...... } In Magento 1, it's ...
Khoa TruongDinh's user avatar
3 votes

How to override Magento 2 REST API Product Search Results for Custom Attributes?

you can achieve this by creating your own module. Create an endpoint in 'webapi.xml' implement your own repository Create custom Interface thats holds data structure Repository method ie: getList ...
95623's user avatar
  • 174

Only top scored, non community-wiki answers of a minimum length are eligible