Child pages
  • Advanced Search - Magento 2
Skip to end of metadata
Go to start of metadata

Magento 2 Advanced Search makes on-site search quick and efficient with the Elasticsearch engine and advanced functionality. The module ensures the opportunity to find relevant results across all the products, static pages, and even blog posts and FAQ's if integrated with the corresponding Aheadworks extensions. The effectiveness of the workflow is additionally supported by autosuggestions, recent searches, improved synonyms, spelling corrections, and other functions.

Product Page

Thank you for choosing Aheadworks!


Installing Advanced Search

Command Line Installation

1. Backup your web directory and store database

2. Download Advanced Search installation package

 3. Upload contents of the Advanced Search installation package to your store root directory

 4. In SSH console of your server navigate to your store root folder:

cd path_to_the_store_root_folder

run:

php -f bin/magento module:enable Aheadworks_AdvancedSearch

then:

php -f bin/magento setup:upgrade

after:

php -f bin/magento setup:static-content:deploy

5. Flush store cache; log out from the backend and log in again

Icon

Make sure the installation is done from under the FTP administrator account. Otherwise, make sure to set 775 permissions to the store root directory after the extension is deployed.

Composer Installation

1. Log in to your customer account at https://ecommerce.aheadworks.com and navigate to Account -> Composer access;

2. Configure your store to work with the Aheadworks composer repository:

Add composer repository to composer.json by running:

composer config repositories.aheadworks composer https://dist.aheadworks.com/ in the Magento installation root.

Use a key pair provided as login and pass. You can optionally save them in the global composer auth file.

 3. You can start using AW composer now.

 For extension names, navigate to Account -> Composer access.

 4. Open the root Magento directory on your server and send Composer the following command:

composer require <component-name>:<version>

Note: Use the previously copied component name and version.

 5. Make sure that Composer finished the installation without errors. Flush store cache, log out and log into the backend again.

 


Installing the Elasticsearch package

Next, you'll need to install the Elasticsearch package into Magento root directory with the following command:


composer require elasticsearch/elasticsearch:~6.0

 


Getting Around

Right after the installation of the Advanced Search extension, you need to configure Elasticsearch, define the general extension settings, and add new indexes, if necessary. Please refer to corresponding sections below.


Icon

Elasticsearch is a third-party solution, which has to be installed individually on your web server and connected with the Magento store. The installation requires some OS-administrative skills, so you may need to contact your server administrator or hosting provider on the matter.

As soon as all the above configuration steps are passed you can enjoy the result on the frontend. Advanced Search provides the next benefits and functionality values:

  • Search by products, CMS pages, and even blog and FAQ content (integration required);
  • Automatic search result suggestions;
  • Search query spelling corrections;
  • Improved web store productivity.

Search Pages and Content

By default, Advanced Search is able to search results across products and CMS pages. Moreover, it looks through the entire content related to products regardless whether it is displayed on product pages or not.

Still, only the product pages with 'Search' and 'Catalog and Search' visibility options are going to be displayed as search results by the extension. This behavior is equally applicable to Magento Open Source and Magento Commerce editions. In addition to that, for the Magento Commerce online stores, the extension also complies with user access catalog restrictions.

In order to expand the searchable area, you can install our Blog and FAQ extensions and provide customers with blog posts and FAQ sections content search.

Once a shopper enters a search query and hits 'Enter' or taps the 'all search results' button on the popup, the search results page appears. It may contain up to four tabs with products, CMS pages, Blog posts, and FAQ content results.

All the fetched product results can be sorted and filtered by the native layered navigation functionality.

 

Icon

If you have installed our Layered Navigation 1.9.X +, you can also use it for the same purpose.

Automatic Suggestions

With Advanced Search, customers start receiving search results as soon as they type the first characters of their search queries. This serves both as a great usability improvement and as a suggested direction to particular products and pages.

All the suggested results are divided into several blocks by their importance for customers. First come products, next product categories, and finally CMS, Blog, and FAQ page results.

The whole query or a part of it is highlighted, so customers can easily distinguish where and how it appears on the fetched pages. For example, the search popup may contain product and category names, or some text extracts containing the search query.

Once a customer enters the search box for the second time, a block with recent searches pops up immediately. This way customers do not need to recall their previous searches. The 'recent search' results are stored during one visitor's session. If necessary, customers can clear the history of searches in one click. Magento admins can also disable this functionality from the backend.


Icon

The query is considered to be valid for 'recent searches' if:

  • Using this query a customer clicked on the 'All search results' button and was redirected to the search results page;
  • A customer received an autosuggestion and clicked on the provided option. This option will be added to recent searches;
  • A customer selected a suggested product search option, the whole word of the product name will be considered as a recent search term.

Spelling Corrections

If customers make some typos entering a search query, the Advanced Search extension will still provide the results for both incorrect and/or corrected search queries.

Increased Productivity

As an additional benefit, the Advanced Search extension allows you to run both search and catalog on Elasticsearch.

Product Visibility and User Permissions Consideration

Advanced Search takes into account product visibility options. So, products are searchable only if they have either Search or Catalog, Search visibility values enabled.

For Magento Commerce stores, it additionally complies with the catalog permissions declared for particular customer groups.

 


Backend Configuration

Elasticsearch Configuration

The first step you need to take right after the Advanced Search installation is to enable and configure Elastic search. The configuration section is located at: Stores > Configuration > Catalog > Catalog > Catalog Search. Choose the Advanced Search option in the Search Engine drop-down. Next, you need to select the Elasticsearch option in the Advanced Search engine drop-down.

Now, you need to configure the Elasticsearch engine using the next setting options:

  • Advanced search engine - Elasticsearch;
  • Elasticsearch Server Hostname - specify the full hostname or IP address of the Elasticsearch server;
  • Elasticsearch Server Port - Elasticsearch server proxy port, usually 443 for a secure proxy;
  • Elasticsearch Index Prefix - prefixes are used in the cases you have single Elasticsearch for more than one Magento instance (for example, staging and development environments) in order to distinguish them from each other;
  • Enable Elasticsearch HTTP Auth - enable this option if you use authentification for your Elasticsearch server. If enabled, also specify your username and password;
  • Elasticsearch Server Timeout - determines the time in seconds a server waits for the connection with the Elasticsearch.

As soon as all the above options are provided you can test the connection using the dedicated button.

Extension Configuration

The second step is the extension configuration. The Configuration page has two sections: General and Search Autocomplete Suggestions Configuration. The first one allows you to enable/disable spelling corrections with the Enable Did You Mean Search option.

Icon

The functionality is able to slow down your store performance.

The second section contains three configuration options:

  • Enable Autocomplete Suggestions - allows you to enable the autosuggestions functionality;
  • Show search query highlight - makes it possible to highlight search queries in search results in bold;
  • Maximum number of recent searches - determines the number of recent search suggestions to be displayed on frontend.

Index Management

Search indexes determine the areas of search used by the extension. As soon as Magento has its own on-site search functionality, all the indexes existing before the extension installation are used by Advanced Search automatically, so you have no need to create them once again.

Consider

Icon

Right after the extension installation, all searchable attributes and their weights are imported into the extension's product index. After that, any connection with the Magento search settings of those attributes is not maintained. In practice that means that:

  • It is recommended that both attribute weights and "searchable" flags are managed on the Product Index page.
  • Any changes of those parameters on the native attribute settings page will not have any effect unless they will be manually duplicated on the Product Index page.
  • Any changes of search parameters on the extension's Product Index page are not reflected in native attribute settings.

Index Management Page

In order to enter the Index Management page please follow the next path: Marketing > Advanced Search by Aheadworks > Index Management. The Index Management grid displayed on the page contains several columns: ID, Type, Store View, Status, Updated, and Action. This way, you can see all the indexes in one place, know their type, eligible store views, index statuses, dates and time of their updates. You can also edit, delete or invalidate the indexes using the Select drop-down in the Action column. Also, you are able to delete or invalidate indexes massively using the provided mass-action functionality.

Using the Add Index button you can create any number of new indexes you need.

Create New Index

By default, using the Add Index drop-down you can create two types of indexes: Products and CMS pages. But, if you have installed our latest Blog and FAQ extensions, the drop-down will contain four options, including Blog And FAQ.

Each New Index or Edit Index page has two sections: General and Searchable Attributes. Using the options of the first section you can enable/disable the extension and assign it to a particular Magento store or store view. The second section allows you to add any number of index attributes, edit, and delete the existing ones.

Icon
  • You won't be able to create an index until at least one index attribute is provided.
  • Also, you can't create two or more indexes of the same type.

The Searchable Attributes has two manageable columns: Attribute Code and Weight. The first one defines the attribute while the second defines the importance of the attribute to be used in search results. The attributes with higher weights are more important.

Product Index

The Product index allows you to utilize all and any product attributes as product index attributes. As soon as you add a new attribute and enter the Attribute Code box, the extension shows the whole list of available product attributes. You can also narrow down the selection and use only searchable attributes with the Attributes Set as Searchable in Magento checkbox.

CMS Index

The CMS index type allows the extension to search through enabled CMS pages. The list of available attributes includes:

  • Page Title;
  • Content Heading;
  • Content;
  • Meta Title;
  • Meta Keywords;
  • Meta Description.

The Additional Settings section allows you to exclude particular pages from the created index.

Blog Index

The Blog index is used to search the posts created by the Blog extension for Magento 2 by Aheadworks. It processes only published posts. The list of available attributes includes:

  • Post Title;
  • Short Content;
  • Content;
  • Mets Description;
  • Tags.

FAQ Index

The FAQ index type allows the extension to search through the articles created by the FAQ extension for Magento 2 by Aheadworks. The list of available index attributes includes:

  • Article Title;
  • Meta Title;
  • Meta Description;
  • Content;
  • Category.

Reindex Mechanisms

As soon as new products are created, new CMS pages are added, new blog posts and FAQ articles are written, search indexes should be regularly updated. Advanced Search allows to renew indexes:

  • When you save a new index,
  • Manually on the native Magento Index Management page;
  • Automatically by cron.

Synonym Management

Synonyms significantly improve the quality of search and able to offer more valuable search results. The Advanced Search extension works with the existing synonym groups, so you don't have to create them once again after the installation of the extension.

The module also makes it possible to add new search terms to existing synonym groups or create new ones right from the Search Terms page in a few clicks.

 

Failure-proof Support

In the case, you use Elasticsearch located on a remote server and anyhow experience some connection issues, the Advanced Search extension provides you with the failure-proof support. If this situation happens, the extension switches the on-site search to the native MySQL search engine and allows your customers to continue using the search functionality.

Integrations with Aheadworks Extensions

Layered Navigation for Magento 2

The Advanced Search extension is integrated with Layered Navigation 1.9 and higher, which makes it possible to filter search results using the functionality provided by the extension.

Blog for Magento 2

The Advanced Search extension is integrated with Blog 2.4 and higher, which makes it possible to search through the blog posts created by the extension.

FAQ for Magento 2

The Advanced Search extension is integrated with FAQ 1.1 and higher, which makes it possible to search through the FAQ articles created by the extension.

Product Page

Need Customization?

Magento 2 Custom Development Services by Aheadworks


You can always find the latest version of the software, full documentation, demos, screenshots and reviews at http://ecommerce.aheadworks.com
License agreement: http://ecommerce.aheadworks.com/LICENSE-M1.txt
Contact Us: http://ecommerce.aheadworks.com/contacts/
Copyright © 2018 aheadWorks Co. http://www.aheadworks.com

You'll need to install elasticsearch package into Magento root directory with the following command:


  • No labels