the new way of searching in magento 2

29

Upload: igor-minyaylo

Post on 08-Jan-2017

706 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: The new way of searching in Magento 2
Page 2: The new way of searching in Magento 2

The new way of searching in Magento 2

Page 3: The new way of searching in Magento 2

Igor Miniailo

Architect, Magento 2@iminyaylo at [email protected]

Page 4: The new way of searching in Magento 2

E-commerce Search

Why on-site Search matters

Page 5: The new way of searching in Magento 2

Why on-site Search matters

• Searching has become the predominant method for users to find products on websites.

• The Search feature on website is immensely important as those searching have a better idea of what they want, compared to those who are browsing using the site links and navigation.

Searchers are almost twice as likely to convert than non-searchers in a given visit.

Page 6: The new way of searching in Magento 2

200+ M1 Search extensions on Magento Connect

Page 7: The new way of searching in Magento 2

M1 Search problems

Like, Full Text, Combined -

confusing for merchants.

Limited ability for extension

and customization

High degrees of code coupling

Weighting attributes only available in EE

Like, Combined are SLOW

Low Search Accuracy

Page 8: The new way of searching in Magento 2

M1 Search problems

FullText Search doesn’t support partial phrase

matching

MyISAM FullText by default ignores

words under 4 characters

There is no SOLR 4.*

support for EE version

MyISAM FullText has a list of ignored

words

Others

Page 9: The new way of searching in Magento 2

Community Feedback

https://github.com/magento/magento2/issues/622

Page 10: The new way of searching in Magento 2

Community Feedback

https://github.com/magento/magento2/issues/622

Page 11: The new way of searching in Magento 2

E-commerce Search

Deep Dive

Page 12: The new way of searching in Magento 2

The 12 Query Types

Identified during large-scale usability study of e-commerce search made by Baymard Institute

Page 13: The new way of searching in Magento 2

5 essential query types

1. Exact2. Product Type3. Feature4. Thematic5. Relational Searches.

Users can get by with basic e-commerce search when these 5 query types are supported. Conversely, failing to support any of these core query types will result in a defective search experience.

Page 14: The new way of searching in Magento 2

New way of Searching

Declarative Search

Page 15: The new way of searching in Magento 2

Declarative search. Request parts

1Filters

2Queries

3Aggregation

1. Exact matching2. Binary yes/no searches

1. Full text searches2. Relevance sorting

1. Faceted Search

Page 16: The new way of searching in Magento 2

Declarative Search. Queries

app\code\Magento\CatalogSearch\etc\search_request.xml

Page 17: The new way of searching in Magento 2

Declarative Search. Filters

app\code\Magento\CatalogSearch\etc\search_request.xml

Page 18: The new way of searching in Magento 2

Declarative Search. Aggregations

app\code\Magento\CatalogSearch\etc\search_request.xml

Page 19: The new way of searching in Magento 2

Search Service Contract

Page 20: The new way of searching in Magento 2

Basic workflow

Page 21: The new way of searching in Magento 2

Simple Example

1. User inputs search request into the quick search form. For example: “gold iPhone“

2. Search request comes to back-end and Magento fulfill \Magento\Search\Api\SearchInterfaces::search(SearchCriteriaInterface $searchCriteria)

3. Implementation reads declaration for current search request (Quick Search) .

4. Add Searchable attributes including custom attributes.Add Filter queries for visibility, price, category, colorAggregations for: price, color, category

Page 22: The new way of searching in Magento 2

Simple Example

5. Bind user's data:“gold iPhone" ->

<query xsi:type="matchQuery" value="$search_term$" name="search"> "visibility" -> Search (2) and Category and Search (4)

6. Clean unused queries and filters:price, category, color (filter)

7. Build final request

8. Search engine handles request and gets results

Page 23: The new way of searching in Magento 2

Simple Example. Result

Page 24: The new way of searching in Magento 2

Library vs Adapter

Adapters are supposed to be a set of factories which build generic search entities handled in client’s code

Page 26: The new way of searching in Magento 2

SmartSearch API usage

Page 27: The new way of searching in Magento 2

Performance

* Don’t consider values. Important just a trend

Page 28: The new way of searching in Magento 2

Magento meets Elasticsearch

1.7.* and 2.* versions supported

Page 29: The new way of searching in Magento 2

Q & A

@iminyaylo at [email protected]