Autocomplete (optional)
GitHub - magesuite/autocomplete
This module improves autocomplete with auto-generation of suggestions. Additional terms are generated automatically based on product names. Also searched text cab be bolded in results.
Â
Installation
This module is optional
composer require "creativestyle/magesuite-autocomplete" ^1.0.0
this module requires Smile_ElasticsuiteCatalog
module.
Admin settings
Additional settings are located in: Stores -> Configuration -> ElasticSuite -> Autocomplete -> Popular Term autocomplete
Setting
Name | Value | Note |
---|---|---|
Generate terms | Yes/No | Along with terms coming from search history, additional terms will be generated automatically based on products names. Terms will be merged with search history based on returned products count. |
Bold searched text in results | Yes/No | When enabled searched text will be bolded on results list |
Search Performance Improvement
The module provides also performance improvement for getting top search result collection
The default value of TTL is 3600s (1h).
If you want to change it follow to:
Store
Configuration
Catalog
Catalog Search
Top Search Result Cache's Lifetime (TTL)
Backend
Class | Description |
---|---|
\MageSuite\Autocomplete\Plugin\Search\Model\ResourceModel\Query\Collection\GetFromCacheIsTopSearchResult  | This plugin overwritten: \Magento\Search\Model\ResourceModel\Query\Collection::isTopSearchResult The base method is not optimal and due to performance, the logic has been moved to the plugin and is executing if is not possible to get the result from the cache. |
TODO - BE documentation and review of documentation is needed
Frontend
Search term Yoga
in autocomplete results is bolded:
Â
Â