Top Banner
Drupal + Solr: Yandex Market with your own hands Eugene Ilyin
36

Drupal + Solr or how to make your own hands Yandex Market

Jul 13, 2015

Download

Internet

DrupalJedi LLC
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Drupal + Solr or how to make your own hands Yandex Market

Drupal + Solr:Yandex Market with your own hands

Eugene Ilyin

Page 2: Drupal + Solr or how to make your own hands Yandex Market

Eugene Ilyin

[email protected]: ilyin.e

I have 5 years experience in Drupal development:● More than 30 projects● Solr for more than on 15 projects● Series of articles about Drupal + Solr on habr● Development of my own modules for search● Patches for existing search modules

Page 3: Drupal + Solr or how to make your own hands Yandex Market

=

Why search is important?

Page 4: Drupal + Solr or how to make your own hands Yandex Market

Statistics● Online sales are growing by 25-30% each year

● 70% of people in Russia shop in the Internet

● Buyers are more likely to use Yandex.Market,

Wikimart, Ebay

Page 5: Drupal + Solr or how to make your own hands Yandex Market

How to adapt the Drupal for growing market demands?

Page 6: Drupal + Solr or how to make your own hands Yandex Market

витрины

визуализация

иерархия

выкладки

гибкие фильтры

Page 7: Drupal + Solr or how to make your own hands Yandex Market

доуточнение выборки

сортировки

промоушен

Page 8: Drupal + Solr or how to make your own hands Yandex Market

Yandex Market Drupal Market

динамично

отзывчиво

Page 9: Drupal + Solr or how to make your own hands Yandex Market

Don't make it on SQLthere are search engines for this

Page 10: Drupal + Solr or how to make your own hands Yandex Market

How to make perfect catalog?

Fulltext search with good stemming

Many options

User-friendly filters

Clever sortings

Dynamic facets

Perfect catalog

Page 11: Drupal + Solr or how to make your own hands Yandex Market

● Search API

● Search API Solr Search

● Facet API

Tools: must have

Page 12: Drupal + Solr or how to make your own hands Yandex Market

● Search API Views

● Facet API Pretty Paths

● Search API Autocomplete

● AJAX Facets

● Search API Sorts

Tools: useful

Page 13: Drupal + Solr or how to make your own hands Yandex Market

Search: basic entities

Search Server

Search Index Search Index

Field Field Field Field Field Field

Facet FacetFacetFacet

Page 14: Drupal + Solr or how to make your own hands Yandex Market

● Quality of search results

● Dynamic set of indexed fields

● Customization of facet filters

● Work with sorting

Main problems

Page 15: Drupal + Solr or how to make your own hands Yandex Market

Quality of search results

+Completeness of the search results

Stemming

Additional fields with tags

Relevance

Weight of fields

Elevation

Boost

Synonyms

Page 16: Drupal + Solr or how to make your own hands Yandex Market

What is stemming?

Mr. Stemmer

Hunspell

Page 17: Drupal + Solr or how to make your own hands Yandex Market

● Enable stemmer in schema.xml

● Prepare dictionaries

● Reindex content

How to configure stemming?

Page 18: Drupal + Solr or how to make your own hands Yandex Market

● Dictionary consists of two files

● File .aff contains the rules for words

● File .dic contains the list of words

What is the structure of dictionaries?

Page 19: Drupal + Solr or how to make your own hands Yandex Market

Synonyms? How it works?

Page 20: Drupal + Solr or how to make your own hands Yandex Market

Configuration of synonyms

Groups of synonyms:

Television, Televisions, TV, TVs

Mappings:

Ifon, I Phone, I-Phone => IPhone

Page 21: Drupal + Solr or how to make your own hands Yandex Market

Dynamic and static attributes

Page 22: Drupal + Solr or how to make your own hands Yandex Market

● Set of attributes changes very often

● How to add attributes into index?

● How to enable facets for new attributes?

Problems of dynamic attributes

Page 23: Drupal + Solr or how to make your own hands Yandex Market

● Module Relations to link entities and attributes

● hook_entity_info_alter to generate fields

● Use the mechanism of Features for facets

How to work with dynamic attributes?

Page 24: Drupal + Solr or how to make your own hands Yandex Market

Facet filters

LinksCheckboxes

DropdownSlider

Interval HierarchyDate & time

Graphs

Page 25: Drupal + Solr or how to make your own hands Yandex Market

Customization of facets

Prepare data Make your widget Done!

Page 26: Drupal + Solr or how to make your own hands Yandex Market

AJAX Facets - how it works?

FilteringAJAX

request to the server

Search by new parameters

Update of filters on the page

Update of search results

Page 27: Drupal + Solr or how to make your own hands Yandex Market

Super Facet!

Page 28: Drupal + Solr or how to make your own hands Yandex Market

Configurable facet

Page 29: Drupal + Solr or how to make your own hands Yandex Market

Sorting of search results

Page 30: Drupal + Solr or how to make your own hands Yandex Market

Sorting and boost query

On stock

To order

Not available

Sorting by relevance

x1000

x100

Page 31: Drupal + Solr or how to make your own hands Yandex Market

Sorting and elevation

Usual results

Elevated

Page 32: Drupal + Solr or how to make your own hands Yandex Market

Not friendly:www.example.com?q=node/1www.example.com/node/1

Friendly:www.example.com/articles/first-article

Human-friendly URL

Page 33: Drupal + Solr or how to make your own hands Yandex Market

www.example.com?f[0]=field_name:value

www.example.com?f[0]=field_brand:bosch

Urls on pages with filters

Page 34: Drupal + Solr or how to make your own hands Yandex Market

Module Facet API Pretty Paths

www.example.com/field_name/value

www.example.com/brand/bosch

Human-friendly urls for filters

Page 35: Drupal + Solr or how to make your own hands Yandex Market

In conclusion Drupal has many components and solutions for search