23

Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

  • Upload
    others

  • View
    2

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search
Page 2: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

For more details see the Elastic Search for Magento 2 extension page.

Elastic Search for Magento 2

Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate,fast and flexible search.

Autocomplete suggestions & spell correctionsPartial search by SKU, name, attributes, categoryProduct attribute weight settingsFlexible indexing managementMulti-lingual searchResponsive & mobile-friendly

Before Installing

Please, consider that there are three main entities, which constitutes the extension's work:

Elasticsearch engine, which version should be equal to or greater than 5.x (The extensionsupports Elasticsearch 5.x, 6.x);

You can check the version via curl request, for example:

Elasticsearch-php, which is the Elasticsearch library;

Note, that the Elasticsearch-php library and Elasticsearch engine itself are different things. In itscomposer.json dependencies, the extension has “elasticsearch/elasticsearch”: “>=5.1”specified, which means that 5th version of the PHP-library will be installed via Composer. However,along with that, you have to install Elasticsearch engine as well.

Amasty Elastic Search for Magento 2 extension, which is a configurable bridge betweenElasticsearch engine and Magento platform.

Page 3: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 3/23 Elastic Search for Magento 2

Installing ElasticSearch enginePrior to all the extension's settings, please, make sure that Elasticsearch engine is properly installed.If you are experiencing any difficulties with the Elasticsearch engine installation process, you can getour Elasticsearch installation service.

Elasticsearch is provided in the various packages formats. The most commonly servers work onDebian-based or RPM-based systems.

Install ElasticSearch with Debian Package

Debian Package can be used to install Elasticsearch on any Debian-based system such as Debian andUbuntu. You can install and run the Elasticsearch Debian package with the following:

wgethttps://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.debwgethttps://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.deb.sha512shasum -a 512 -c elasticsearch-6.3.0.deb.sha512sudo dpkg -i elasticsearch-6.3.0.debsudo update-rc.d elasticsearch defaults 95 10sudo -i service elasticsearch start

For more details on the installation aspects, please, visit the official Elasticsearch documentation.

Install ElasticSearch with RPM

It can be used to install Elasticsearch on any RPM-based system such as OpenSuSE, SLES, Centos,Red Hat, and Oracle Enterprise. The RPM for Elasticsearch v6.3.0 can be downloaded from the websiteand installed with the following commands:

wgethttps://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.rpmwgethttps://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.rpm.sha512shasum -a 512 -c elasticsearch-6.3.0.rpm.sha512sudo rpm --install elasticsearch-6.3.0.rpmsudo chkconfig --add elasticsearchsudo -i service elasticsearch start

For more details on the installation aspects, please, visit the official Elasticsearch documentation.

Page 4: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

Connect to Elastic Search

To manage a connection to Elastic Search, go to Admin Panel > Stores > Configuration > ElasticSearch > Connection

To enable the extension, in the Search Engine field, select the Amasty ElasticSearch. Alternatively,select MySQL, to disable the extension.

Elasticsearch Server Hostname - Specify a host name or IP address of a machine that runsElasticsearch. (localhost or 127.0.0.1 by default).Get this value via Magento Cloud.

Elasticsearch Server Port - Set the Elasticsearch web server proxy port. In our example, the port is9200.Get this value via Magento Cloud.

Elasticsearch Index Prefix - Specify a particular prefix for each store that you employ elastic searchfor.

I.e. If you use a single Elasticsearch instance for more than one Magento installation (for instance,Staging and Production environments), specify a unique prefix for each installation.

Enable Elasticsearch HTTP Auth - Select Yes, if you have enabled authentication for yourElasticsearch server. Specify a user name and password in the pop-up fields.

Elasticsearch Server Timeout - Set the timeout.

Click Test Connection.

Page 5: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 5/23 Elastic Search for Magento 2

Autocomplete suggestions & Spelling correctionTo configure Elastic Search functionality, go to Admin Panel > Stores > Configuration > ElasticSearch > Catalog

Wildcard Type - Specify the type of the autocomplete suggestion - the part of a word which will beauto-completed. Three types are available to set:

Wildcard After - Specify a number of symbols, after which an autocomplete suggestion will beapplied.

Page 6: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

Autocomplete suggestions after 3 symbols.

Spell Correction - Specify a number of symbols, after which a spell correction will be applied.

Spell correction after 4 symbols.

Max Number of Search Results - Specify the maximum number of items in the search results.

Set 0 to use default Magento limitation, which is 10000 items.

Allow Special Characters - Enable a long-tail search. The search will include the hyphens, slashesand any symbols. The feature provides precise results, when searching by SKU and MPN(manufacturer part numbers).

Page 7: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 7/23 Elastic Search for Magento 2

A sample of the precise long-tail search by SKU.Note that the default search will not return any results for 24-MB04 request as it is based on thedefault product labels from a database, while the long-tail feature analyzes the keywords bypatterns and “fixes” the query, returning the precise search results.

Advanced Query Settings

Add a product attribute

A product attribute in advanced query settings.

To add a product attribute to a search query configuration, please go to Admin Panel > Stores >Attributes > Product > Select a needed product attribute > click a tab Storefront Properties >Enable Use in Search

How to add a product attribute to a search query settings (watch full screen).use-in-search.mp4

Query

Page 8: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

Specify the search type preferences for each product attribute:

In case both Wildcard and Spell Correction are set to Yes, only Wildcard search type will beapplied as having higher search priority.Consider, that shoppers don't have to input neither asterisks, nor boolean operators in a searchquery. The functionality is fully implemented in the search logic.

Wildcard search presupposes that shoppers can input a half-finished word, and get a relevantresult.Match Mode is how the words in a search query are combined. Shoppers don't have to inputAND/OR in a search query. Go to match mode settings.

Product Name attribute with Wildcard vs with Spell Correction

How does a search work for a Name attribute with auto-suggestion vs with spell correction (watch fullscreen)

wildcard-spell.mp4

Match Mode

Think over how would you like the keywords in a search query to be combined for each productattribute.

How it works?

Page 9: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 9/23 Elastic Search for Magento 2

For instance, a customer searches your web store looking for a velvet jacket. As you specify a booleantype for a Product Name attribute:

AND logic will return only results that contain both velvet and jacket1.OR logic will return results that contain either velvet or jacket (velvet shoes, denim jacket, etc)2.

Search results for 'radiant tee' sample

with AND logic

with OR logic

Synonyms & Stop wordsTo build a dictionary of synonyms, navigate to Admin Panel > System > Manage Synonyms

Click Add New Synonym to input a group of words that will be regarded equally by a search logic.Separate them with commas.

Select a Store View.

You can switch to edit an entry by clicking Select in Action column on the synonyms' grid.

Page 10: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

You can import a CSV file with synonyms dictionary.

Have a look at a search by synonyms in action (Watch full screen).elast-synonym.mp4

Advanced Search

Go to Admin Panel → Stores → Configuration → Search Pro, to configure the advanced searchfeatures.

Popup width (px) - Specify the width of a search pop-up window to make it fit your theme and pagelayout elements.

Min characters - Set the minimal number of characters that customers should type in to trigger the

Page 11: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 11/23 Elastic Search for Magento 2

search pop-up. By default, the number is three.

Enable Redirect from 404 to Search Results - Enable the option to redirect customers to thestore search results from the broken URL instead of the 404 Not Found page.See sample

Custom URL Key for Default Search Results Page - Enable to set SEO-friendly short URLs.

The extension returns shorter URLs like example.com/search/shoes instead of defaultexample.com/catalogsearch/results/q=shoes.

SEO key - specify the URL alias for the search results' page.

Search Attributes

Include any available product attributes in the search algorithm.

Set a priority (weight) for each attribute.

Page 12: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

If there is a color attribute with weight 10 and description attribute with weight 5, and the query isred, search results will be more visually relevant, because the algorithm will choose color attributeprior to the words in description.

Press Add button to add one more attributeSelect Attribute from a drop-downSet its Weight from 1 to 10 - select from a drop-downDelete an attribute by clicking an icon in Action column

Page 13: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 13/23 Elastic Search for Magento 2

Recent Searches

Show on first click - Set to Yes to let customers see the Recent Searches block in the autocompletepopup once they click on the quick search field.

Title - Set a title and a position for Recent searches block.

Max Results - Set the maximal number of search results that will be displayed in the searchautocomplete popup.

Page 14: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

Display Recent Searches in a pop-up

Page 15: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 15/23 Elastic Search for Magento 2

Popular Searches

Enable the Popular Searches block to pop-up by the first customer's click.

Page 16: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

A sample

Categories

Enabled - Enable to let the extension display the categories that contain target items in theautocomplete popup.

Specify Categories block title, position and the max number of displayed results.

Description Length - Specify the maximal number of characters for category names anddescriptions that will be shown is the search popup.

Page 17: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 17/23 Elastic Search for Magento 2

When mouse hover over a category link, the directory levels are displayed.

СMS Pages

Enabled - Set to Yes to enable search on CMS pages and display search results in the autocompletepopup.

Max Results - Specify the Title, Position and the Max number of displayed results.

Page 18: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

Specify the maximal number of characters for headings and descriptions that will be shown is thesearch popup.

Products

Enabled - Set to Yes to enable search in products and display search results in the autocompletepopup.

Max Results - Specify the title, position and the max number of displayed results.

Show Reviews - Enable reviews display in the autocomplete popup.

Enable 'Add to Cart' Button - Show Add to cart button in the popup.

Redirect to Product Page - Set to Yes to enable redirection in case there is only one search resultavailable.

Page 19: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 19/23 Elastic Search for Magento 2

Show 'Out of Stock' Products Last - Enable a feature to place the out-of-stock items last in thesearch results.

To make this feature works properly with out-of-stock items being displayed correctly, please makesure that out-of-stock items' visibility is enabled.

Go to Admin Panel > Stores > Configuration > Catalog > Inventory > Stock Options1.Navigate to a Display Out of Stock Products field > Uncheck Use system value and set to2.Yes.

Page 20: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

Out-of-stock items displayed last in the search results, a sample.

Landing Pages

You can enable an advanced search by landing pages on your web store, if you have AmastyLanding pages for Magento 2 extension installed.

Custom Layout

Page 21: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 21/23 Elastic Search for Magento 2

Text - Choose the necessary color for each element of the autocomplete window.

Color Picker - Click on the field to display the color picker tool.

Index Management

To to configure the indexing of your catalog, go to System → Tools → Index Management

Page 22: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

Last update: 2018/06/26 17:00 magento_2:elastic_search https://amasty.com/docs/doku.php?id=magento_2:elastic_search

NOINDEX, FOLLOW

To prevent search engines (Google, Bing, Yahoo, etc.) from needlessly indexing Magento catalogsearch results page(s) and advanced search results page(s) we added the code toapp/design/frontend/YOUR_PACKAGE/YOUR_THEME/layout/local.xml.

If this file does not yet exist in your custom theme you can create it and Magento willautomatically include it.If this file already exists in your custom theme then copy everything except the first line XMLdeclaration and elements into your copy of local.xml.

Page 23: Last update: 2018/06/26 17:00 magento 2:elastic ... · Elastic Search for Magento 2 is an advanced solution which provides your store with highly accurate, fast and flexible search

2018/06/26 17:11 23/23 Elastic Search for Magento 2

From:https://amasty.com/docs/ - Amasty Extensions FAQ

Permanent link:https://amasty.com/docs/doku.php?id=magento_2:elastic_search

Last update: 2018/06/26 17:00