Drupal + Solr or how to make your own hands Yandex Market
-
Upload
drupaljedi-llc -
Category
Internet
-
view
381 -
download
2
Transcript of Drupal + Solr or how to make your own hands Yandex Market
![Page 1: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/1.jpg)
Drupal + Solr:Yandex Market with your own hands
Eugene Ilyin
![Page 2: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/2.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/3.jpg)
=
Why search is important?
![Page 4: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/4.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/5.jpg)
How to adapt the Drupal for growing market demands?
![Page 6: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/6.jpg)
витрины
визуализация
иерархия
выкладки
гибкие фильтры
![Page 7: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/7.jpg)
доуточнение выборки
сортировки
промоушен
![Page 8: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/8.jpg)
Yandex Market Drupal Market
динамично
отзывчиво
![Page 9: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/9.jpg)
Don't make it on SQLthere are search engines for this
![Page 10: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/10.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/11.jpg)
● Search API
● Search API Solr Search
● Facet API
Tools: must have
![Page 12: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/12.jpg)
● 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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/13.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/14.jpg)
● 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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/15.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/16.jpg)
What is stemming?
Mr. Stemmer
Hunspell
![Page 17: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/17.jpg)
● 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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/18.jpg)
● 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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/19.jpg)
Synonyms? How it works?
![Page 20: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/20.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/21.jpg)
Dynamic and static attributes
![Page 22: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/22.jpg)
● 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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/23.jpg)
● 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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/24.jpg)
Facet filters
LinksCheckboxes
DropdownSlider
Interval HierarchyDate & time
Graphs
![Page 25: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/25.jpg)
Customization of facets
Prepare data Make your widget Done!
![Page 26: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/26.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/27.jpg)
Super Facet!
![Page 28: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/28.jpg)
Configurable facet
![Page 29: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/29.jpg)
Sorting of search results
![Page 30: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/30.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/31.jpg)
Sorting and elevation
Usual results
Elevated
![Page 32: Drupal + Solr or how to make your own hands Yandex Market](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/32.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/33.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/34.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022032214/55a39b361a28ab64548b4682/html5/thumbnails/35.jpg)
In conclusion Drupal has many components and solutions for search