Elastic Search Ultimate

Troubleshooting

This section contains the most common problems, that customer can encounter, and how they can be resolved:

Note

Please, make sure, that you're using the last version of the extension. Otherwise, please, update it to the latest version.

Search is not possible by SKU

Please, make sure about the following:

  • SKU attribute is searchable. You can check it in Stores -> Attributes -> Product grid -> SKU -> Storefront Properties -> Use in Search and Visible in Advanced Search should be Yes.
  • SKU is in the list of Searchable attributes in Product Index. You can check it in System -> Search Management -> Search Indexes -> Product Index.
  • If SKU includes dashes or other non-alphabetic symbols, set up Long-Tail Search expressions.
  • Validate search result. Go to System -> Validator -> Validate Search Results. In Search term field enter your SKU, in Product ID - ID of the product with not searchable SKU and press Validate Search Results.

After enabling fallback search and entering too many words, search fails

Possible cause: too small max_execution_time PHP parameter, which is not enough to complete requests with large number of words.

Solution: there can be two possible solutions.

  1. Increase max_execution_time parameter either in .htaccess, or directly in PHP.ini.

  2. Use default Magento settings to adjust search parameters. They are located at Stores -> Configuration -> Catalog -> Catalog Search and consist of two options:
    • Minimal Query Length - defines minimal quantity of words in search request (1 for default).
    • Maximum Query Length - defines maximal quantity of words in search request (128 by default).

Typically it is enough to decrease the latter parameter, until search will work correctly.

Autocomplete (and/or Search Results) is too slow

Possible Causes and Solutions

  • Search Engine Settings

    How to Check:

    • Navigate to System -> Search Management -> Settings -> Search Engine Configuration. If option Search Engine is set to Built-In Engine or MYSQL, this is the probably cause.

    How to Resolve:

    • If you have Mirasvit MYSQL Search Module version below 1.0.23, upgrade it to latest version. It contains a significant improvement, that speeds-up built-in search engine.
    • Enable option Fast Mode in Autocomplete settings at System -> Settings -> Mirasvit Extensions -> Search Autocomplete section.
    • If this will not help, consider recommendation from next option.
  • Large Quantity of Products (for Sphinx Search Pro and Ultimate extensions)

    How to Check:

    • Navigate to Catalog -> Products section. If you have more than 14k records there, this is the probably cause.

    How to Resolve:

    • Replace Build-In Engine to External Sphinx Engine in option Search Engine at System -> Search Management -> Settings -> Search Engine Configuration.

      Tip

      Search Sphinx shall be installed first, and then connected (see our user manual - Connecting Sphinx Engine).
    • If you use Layered Navigation on your store, consider switching to Elastic Search Ultimate extension. It should improve response time, because it also handles layered navigation requests.
  • Large Quantity of Products (for Elastic Search Ultimate extension) How to Check:

    • Navigate to Catalog -> Products section. If you have more than 14k records there, this is the probably cause.

    How to Resolve:

    • Replace Build-In Engine to Elastic search Engine in option Search Engine at System -> Search Management -> Settings -> Search Engine Configuration.

      Tip

      Elastic search engine shall be installed first, and then connected to your store (see our user manual - Elastic Engine Configuration).
  • High-load Crontasks

    How to Check:

    • Install Cron Scheduler for M2.
    • Navigate to System -> Cron Scheduler by KiwiCommerce -> All cron jobs section and System -> Cron Scheduler by KiwiCommerce -> Cron job schedule timeline. Check there execution time and results of crontasks. If some of them are stuck or executed for too long period, this is the probably cause.

    How to Resolve:

    • Disable or reconfigure all crontasks, which are stuck or taking too much time.
  • Conflicts with other vendor's search extensions

    How to Check:

    • Go to Stores - Configuration - Mirasvit extensions - Developer tab on the sub-modules grid click Validate Installation. If there is any possible conflict, we don't recommend to use a few similar extensions, it may cause conflicts and slow down your search speed.

    How to Resolve: Disable this extension and check your search speed: php bin/magento module:disable <module_name>

Aheadworks blog search doesn\`t return results

  • How to Resolve:
    • Find and open the following file : Aheadworks/Blog/Block/Post.php
    • Find public function getSocialIconsHtml()
    • After condition you will see this row $block = $this->getLayout()->createBlock, place this code before $socialIconsBlock = !empty($this->getSocialIconsBlock())?$this->getSocialIconsBlock():'Aheadworks\Blog\Block\Sharethis';
    • Replace $this->getSocialIconsBlock() after createBlock with $socialIconsBlock
    • You should get your code look like $socialIconsBlock = !empty($this->getSocialIconsBlock())?$this->getSocialIconsBlock():'Aheadworks\Blog\Block\Sharethis'; $block = $this->getLayout()->createBlock( $socialIconsBlock,...

"unknown column" error while Sphinx reindex

  • If your Sphinx Search Engine installed on same server run the following steps:

    • Click "Reset" in Search Engine Configuration (backend)
    • Click "Restart Sphinx Daemon" in Search Engine Configuration (backend)
    • Reindex Search indexes by running bin/magento indexer:reindex catalogsearch_fulltext (CLI) or in System / Search Management / Search Indexes (Backend)
  • If your Sphinx Search Engine installed on a remote server run the following steps:
    • Click "Generate configuration file"
    • Copy generated file to your remote server
    • Run killall -9 searchd on your remote server
    • Start sphinx daemon using command searchd --config <path to config/sphinx.conf>
    • Reindex Search indexes by running bin/magento indexer:reindex catalogsearch_fulltext (CLI) or in System / Search Management / Search Indexes (Backend)

Long reindexing time

1) Whether you have Elastic or Sphinx search Ultimate extension, and use a built-in engine with over 20K products, consider using external search engines. To check your engine settings you may find at System -> Search Management -> Settings -> Mirasvit Extensions -> Search.

2) In case you already use an external search engine, you may check if it has a unique Index Prefix for your store for Elastic Search
or try to stop and restart Sphinx Daemon, then run reindex.

3) You have a Fast Mode enabled at System / Settings / Mirasvit Extensions / Search Autocomplete section: the disadvantages include the increased indexing time of the search index. Otherwise, disable this feature to speed up reindexing time.

4) Additionally disable some options in Product Settings content appearance such as Show Thumbnail, Rating, etc at System / Settings / Mirasvit Extensions / Search Autocomplete section.

5) Make sure there are no duplicate searchable attributes or searchable attributes with search weight = 1 at the Product Index in System -> Search Management -> Search Indexes, otherwise delete those searchable attributes and try reindex.

6) Take a look also on Magento Best Practices for reindexing here.

Error: Please make sure you use different sphinx ports for all these instances

  • When happens: We installed on our staging/dev/test site and configured different ports on staging and on live. But the sphinx engine is not connecting on our staging site, keep getting the error message:

  • How to solve:
    1) turn off “Allow auto-start Sphinx Daemon”, put a different Sphinx Port (any free port, like 9811, 9812) for each instance;
    2) specify the “Custom Base Path” in Additional configuration (for example, for dev store: /home/dev/sphinx/bin/searchd);
    3) separately run reindexes on the instances, and then enable “Allow auto-start Sphinx Daemon”.

Strange search terms

Sometimes you can see unwanted, strange search terms in Reports, Hot searches in the autocomplete or in the Related Search Terms and think it is spam or generated by our extension.

Actually, they are the most searched Search Terms in your Magento, more details find in official Magento documentation here. You can clear some of the search terms and it won't appear: go to Marketing > SEO & Search > Search Terms, find the necessary term and delete it, otherwise, you will need to delete them in the database.

No alive nodes found in your cluster

Usually, it is a server error. The cause for the problem can be found in the server logs at /var/log/elasticsearch/ directory. First of all, make sure it is configured properly, reset elastic search indicies from the console curl -XDELETE localhost:9200/* and run re-index bin/magento indexer:reindex catalogsearch_fulltext. Also, here is the best Magento practices to resolve elastic search problems.