Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
1 / 19
On-site search design patterns for e-commerce:

schema structure, data driven ranking & more
Dr. Martin Loetzsch, P...
! ‣
2 / 19https://goo.gl/xJr9Js
! ‣
A naive product centric approach
2 / 19https://goo.gl/xJr9Js
‣Don’t do this!
{

"name": "Fäustel DIN6475 2000g Eschens...
! ‣
A naive product centric approach
2 / 19https://goo.gl/xJr9Js
‣Don’t do this!
‣ Huge complexity in schema design and qu...
! ‣
A naive product centric approach
2 / 19https://goo.gl/xJr9Js
‣Don’t do this!
‣ Huge complexity in schema design and qu...
! ‣
A naive product centric approach
2 / 19https://goo.gl/xJr9Js
‣Don’t do this!
‣ Huge complexity in schema design and qu...
{

"type": "staple",

"search_result_data": {

"sku": "SP11968",

"name": "Fortis Fäustel, mit Eschen-Stiel",

"preview_im...
{

"type": "staple",

"search_result_data": {

"sku": "SP11968",

"name": "Fortis Fäustel, mit Eschen-Stiel",

"preview_im...
{

"type": "staple",

"search_result_data": {

"sku": "SP11968",

"name": "Fortis Fäustel, mit Eschen-Stiel",

"preview_im...
{

"type": "staple",

"search_result_data": {

"sku": "SP11968",

"name": "Fortis Fäustel, mit Eschen-Stiel",

"preview_im...
{

"facet-name": "hammer_weight",

"facet-value": "2000"

}

],

"number_facet": [

{

"facet-name": "final_gross_price",
...
{

"facet-name": "hammer_weight",

"facet-value": "2000"

}

],

"number_facet": [

{

"facet-name": "final_gross_price",
...
{

"facet-name": "hammer_weight",

"facet-value": "2000"

}

],

"number_facet": [

{

"facet-name": "final_gross_price",
...
{

"facet-name": "hammer_weight",

"facet-value": "2000"

}

],

"number_facet": [

{

"facet-name": "final_gross_price",
...
{

"facet-name": "hammer_weight",

"facet-value": "2000"

}

],

"number_facet": [

{

"facet-name": "final_gross_price",
...
‣
Faceted navigation
4 / 19https://goo.gl/xJr9Js
‣
Faceted navigation
4 / 19https://goo.gl/xJr9Js
Facet counting
‣
Faceted navigation
4 / 19https://goo.gl/xJr9Js
Filtering
Faceted navigation: the standard way
‣ Put all filterable attributes in unanalyzed document field:
 ‣
5 / 19https://goo.gl/x...
Faceted navigation: the standard way
‣ Put all filterable attributes in unanalyzed document field:
 ‣
5 / 19https://goo.gl/x...
! ‣
Generic faceted navigation
/ 19https://goo.gl/xJr9Js
‣Nicely scales to thousands of facets
‣ Put facet names as values...
! ‣
Generic faceted navigation
/ 19https://goo.gl/xJr9Js
‣Nicely scales to thousands of facets
‣ Put facet names as values...
Generic faceted navigation
/ 19https://goo.gl/xJr9Js
‣Nicely scales to thousands of facets
‣ Put facet names as values in
...
Generic faceted navigation
/ 19https://goo.gl/xJr9Js
‣Nicely scales to thousands of facets
‣ Put facet names as values in
...
Generic faceted navigation
/ 19https://goo.gl/xJr9Js
‣Nicely scales to thousands of facets
‣ Put facet names as values in
...
Full-text search
‣
7 / 19https://goo.gl/xJr9Js
Full-text search
‣
7 / 19https://goo.gl/xJr9Js
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text analysis
‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience
8 / 19https://goo.gl/xJr9J...
Text relevance
‣ Split searchable text by importance in documents:
9 / 19https://goo.gl/xJr9Js
‣Improve relevance by combi...
Text relevance
‣ Split searchable text by importance in documents:
9 / 19https://goo.gl/xJr9Js
‣Improve relevance by combi...
Text relevance
‣ Split searchable text by importance in documents:
9 / 19https://goo.gl/xJr9Js
‣Improve relevance by combi...
Text relevance
‣ Split searchable text by importance in documents:
9 / 19https://goo.gl/xJr9Js
‣Improve relevance by combi...
Text relevance
‣ Split searchable text by importance in documents:
9 / 19https://goo.gl/xJr9Js
‣Improve relevance by combi...
Text relevance
‣ Split searchable text by importance in documents:
9 / 19https://goo.gl/xJr9Js
‣Improve relevance by combi...
Data driven ranking
10 / 19https://goo.gl/xJr9Js
! ‣
‣Align formula with business goals
Data driven ranking
10 / 19https://goo.gl/xJr9Js
! ‣
Result order
‣Align formula with business goals
Data driven ranking
10 / 19https://goo.gl/xJr9Js
! ‣‣ Add normalized scores to document that each reflect a
heuristic what ...
Data driven ranking
10 / 19https://goo.gl/xJr9Js
! ‣‣ Add normalized scores to document that each reflect a
heuristic what ...
Data driven ranking
10 / 19https://goo.gl/xJr9Js
! ‣‣ Add normalized scores to document that each reflect a
heuristic what ...
‣ Example I: expected margin
Normalized, evenly-distributed scores I
11 / 19https://goo.gl/xJr9Js
‣Look at the distributio...
‣ Example I: expected margin
Normalized, evenly-distributed scores I
11 / 19https://goo.gl/xJr9Js
‣Look at the distributio...
‣ Example I: expected margin
Normalized, evenly-distributed scores I
11 / 19https://goo.gl/xJr9Js
‣Look at the distributio...
‣ Example I: expected margin
Normalized, evenly-distributed scores I
11 / 19https://goo.gl/xJr9Js
‣Look at the distributio...
‣ Example II: expected time of delivery
Normalized, evenly-distributed scores II
12 / 19https://goo.gl/xJr9Js
‣Finding mea...
‣ Example II: expected time of delivery
Normalized, evenly-distributed scores II
12 / 19https://goo.gl/xJr9Js
‣Finding mea...
‣ Example II: expected time of delivery
Normalized, evenly-distributed scores II
12 / 19https://goo.gl/xJr9Js
‣Finding mea...
‣ Example II: expected time of delivery
Normalized, evenly-distributed scores II
12 / 19https://goo.gl/xJr9Js
‣Finding mea...
‣ Example II: expected time of delivery
Normalized, evenly-distributed scores II
12 / 19https://goo.gl/xJr9Js
‣Finding mea...
Multi-term auto-completion
! ‣
13 / 19https://goo.gl/xJr9Js
‣Allow users to drill down to results by combining multiple at...
Multi-term auto-completion
! ‣
13 / 19https://goo.gl/xJr9Js
‣Allow users to drill down to results by combining multiple at...
Multi-term auto-completion
! ‣
13 / 19https://goo.gl/xJr9Js
‣Allow users to drill down to results by combining multiple at...
Multi-term auto-completion
! ‣
13 / 19https://goo.gl/xJr9Js
‣Allow users to drill down to results by combining multiple at...
Simple spelling suggestions
14 / 19https://goo.gl/xJr9Js
‣Very easy to build, and customers expect it
! ‣
Simple spelling suggestions
14 / 19https://goo.gl/xJr9Js
‣Very easy to build, and customers expect it
! ‣
"suggestion_term...
Simple spelling suggestions
14 / 19https://goo.gl/xJr9Js
‣Very easy to build, and customers expect it
! ‣
‣ Apply a simple...
Simple spelling suggestions
14 / 19https://goo.gl/xJr9Js
‣Very easy to build, and customers expect it
! ‣
‣ Apply a simple...
Personalization: dynamic pricing
‣ User specific discounts per product or category
15 / 19https://goo.gl/xJr9Js
‣Scripts ca...
Index pages, not products
‣ Usage driven schemas can be used for any kinds of
searchable documents

‣
16 / 19https://goo.g...
Explicit attribute management
‣ Conscious decisions have to be made about how to use each attribute

‣ An explicit represe...
Product management for search
‣ Best: concrete examples of how search should behave from a user perspective
18 / 19https:/...
Product management for search
‣ Best: concrete examples of how search should behave from a user perspective
18 / 19https:/...
Product management for search
‣ Best: concrete examples of how search should behave from a user perspective
18 / 19https:/...
Product management for search
‣ Best: concrete examples of how search should behave from a user perspective
18 / 19https:/...
‣ Structure documents around the usage of attributes

‣ Index pages, not products



19 / 19https://goo.gl/xJr9Js
Conclusi...
‣ Structure documents around the usage of attributes

‣ Index pages, not products



19 / 19https://goo.gl/xJr9Js
https://...
‣ Structure documents around the usage of attributes

‣ Index pages, not products



19 / 19https://goo.gl/xJr9Js
‣Thank y...
Nächste SlideShare
Wird geladen in …5
×

On-site search design patterns for e-commerce: schema structure, data driven ranking & more

5.566 Aufrufe

Veröffentlicht am

Extensive writeup: http://project-a.github.io/on-site-search-design-patterns-for-e-commerce/

How can customers find the products that are relevant to what they are searching for? We will show in quite some detail how to set up Elasticsearch and how to represent documents so that:

* a customer can easily find what he wants by clicking through the category tree and applying filters (faceted navigation)
* relevant products can be found through a full text search (with optionally more filters applied to drill down the results)
* the right search results show up as suggestions when text is entered into the search box (completion)
* an alternative search result is shown when a term is misspelled (spell-checking)

Furthermore, we will introduce a technique for sorting search results that ranks products higher:

that are most relevant for the search
* with better past performance (revenue, clicks, click trough rate, etc.)
* with better expected customer experience (delivery speed, product quality)

And finally, we will illustrate how to personalize search experience along the example of dynamic pricing and discuss some other best practices.

The examples will come from Contorion, an online store for industrial and trade supply that sees on-site search as a major driver of its business. Please note that all the examples work in Elasticsearch 1.x and that some queries will look different in Elasticsearch 2.x, but the main concepts will still hold.

Veröffentlicht in: Internet
  • Als Erste(r) kommentieren

On-site search design patterns for e-commerce: schema structure, data driven ranking & more

  1. 1. 1 / 19 On-site search design patterns for e-commerce:
 schema structure, data driven ranking & more Dr. Martin Loetzsch, Project A Ventures Krešimir Slugan, Contorion https://goo.gl/xJr9Jshttp://project-a.github.io/on-site-search-design-patterns-for-e-commerce/
  2. 2. ! ‣ 2 / 19https://goo.gl/xJr9Js
  3. 3. ! ‣ A naive product centric approach 2 / 19https://goo.gl/xJr9Js ‣Don’t do this! {
 "name": "Fäustel DIN6475 2000g Eschenstiel FORTIS",
 "staple-name": "Fortis Fäustel, mit Eschen-Stiel",
 "description": "Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "preview_image": "faeustel-din6475-2000g-eschenstiel-fortis-21049292-0- JlHR5nOi-l.jpg",
 "categories": [
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "final_gross_price": 1149,
 "final_net_price": 1003,
 "url": "/handwerkzeug/fortis-faeustel-mit-eschen-stiel-SP11968",
 "manufacturer": "Fortis",
 "hammer_weight": 2000
 } ‣ What are the attributes of your documents?
  4. 4. ! ‣ A naive product centric approach 2 / 19https://goo.gl/xJr9Js ‣Don’t do this! ‣ Huge complexity in schema design and query generation • Queries need to explicitly list the attributes they want to operate on • Difficult to use the same attribute in different operations • Whenever new attributes appear, the schema needs to be extended {
 "name": "Fäustel DIN6475 2000g Eschenstiel FORTIS",
 "staple-name": "Fortis Fäustel, mit Eschen-Stiel",
 "description": "Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "preview_image": "faeustel-din6475-2000g-eschenstiel-fortis-21049292-0- JlHR5nOi-l.jpg",
 "categories": [
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "final_gross_price": 1149,
 "final_net_price": 1003,
 "url": "/handwerkzeug/fortis-faeustel-mit-eschen-stiel-SP11968",
 "manufacturer": "Fortis",
 "hammer_weight": 2000
 } ‣ What are the attributes of your documents?
  5. 5. ! ‣ A naive product centric approach 2 / 19https://goo.gl/xJr9Js ‣Don’t do this! ‣ Huge complexity in schema design and query generation • Queries need to explicitly list the attributes they want to operate on • Difficult to use the same attribute in different operations • Whenever new attributes appear, the schema needs to be extended ‣ Full potential of data is usually not used {
 "name": "Fäustel DIN6475 2000g Eschenstiel FORTIS",
 "staple-name": "Fortis Fäustel, mit Eschen-Stiel",
 "description": "Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "preview_image": "faeustel-din6475-2000g-eschenstiel-fortis-21049292-0- JlHR5nOi-l.jpg",
 "categories": [
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "final_gross_price": 1149,
 "final_net_price": 1003,
 "url": "/handwerkzeug/fortis-faeustel-mit-eschen-stiel-SP11968",
 "manufacturer": "Fortis",
 "hammer_weight": 2000
 } ‣ What are the attributes of your documents?
  6. 6. ! ‣ A naive product centric approach 2 / 19https://goo.gl/xJr9Js ‣Don’t do this! ‣ Huge complexity in schema design and query generation • Queries need to explicitly list the attributes they want to operate on • Difficult to use the same attribute in different operations • Whenever new attributes appear, the schema needs to be extended ‣ Full potential of data is usually not used ‣ Your search shouldn’t need to know that there is such a thing as the weight of a hammer {
 "name": "Fäustel DIN6475 2000g Eschenstiel FORTIS",
 "staple-name": "Fortis Fäustel, mit Eschen-Stiel",
 "description": "Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "preview_image": "faeustel-din6475-2000g-eschenstiel-fortis-21049292-0- JlHR5nOi-l.jpg",
 "categories": [
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "final_gross_price": 1149,
 "final_net_price": 1003,
 "url": "/handwerkzeug/fortis-faeustel-mit-eschen-stiel-SP11968",
 "manufacturer": "Fortis",
 "hammer_weight": 2000
 } ‣ What are the attributes of your documents?
  7. 7. {
 "type": "staple",
 "search_result_data": {
 "sku": "SP11968",
 "name": "Fortis Fäustel, mit Eschen-Stiel",
 "preview_image": "faeustel-din6475-2000g-eschenstiel-fortis-21049292-0- JlHR5nOi-l.jpg",
 "number_of_products": "4",
 "final_gross_price": "822",
 "final_net_price": "691",
 "base_gross_price": null,
 "base_price_unit": null,
 "url": "/handwerkzeug/fortis-faeustel-mit-eschen-stiel-SP11968"
 },
 "search_data": [
 {
 "full_text": " 21049289 4317784792714 04317784792714 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "full_text_boosted": " Fortis Fäustel DIN6475 1000g Eschenstiel FORTIS 1000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen-Stiel Fortis Fäustel, mit Eschen-Stiel",
 "string_facet": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "1000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 822
 }
 ]
 },
 {
 "full_text": " 21049290 4317784792721 04317784792721 Fäustel DIN Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this!
  8. 8. {
 "type": "staple",
 "search_result_data": {
 "sku": "SP11968",
 "name": "Fortis Fäustel, mit Eschen-Stiel",
 "preview_image": "faeustel-din6475-2000g-eschenstiel-fortis-21049292-0- JlHR5nOi-l.jpg",
 "number_of_products": "4",
 "final_gross_price": "822",
 "final_net_price": "691",
 "base_gross_price": null,
 "base_price_unit": null,
 "url": "/handwerkzeug/fortis-faeustel-mit-eschen-stiel-SP11968"
 },
 "search_data": [
 {
 "full_text": " 21049289 4317784792714 04317784792714 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "full_text_boosted": " Fortis Fäustel DIN6475 1000g Eschenstiel FORTIS 1000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen-Stiel Fortis Fäustel, mit Eschen-Stiel",
 "string_facet": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "1000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 822
 }
 ]
 },
 {
 "full_text": " 21049290 4317784792721 04317784792721 Fäustel DIN Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this! search result rendering
  9. 9. {
 "type": "staple",
 "search_result_data": {
 "sku": "SP11968",
 "name": "Fortis Fäustel, mit Eschen-Stiel",
 "preview_image": "faeustel-din6475-2000g-eschenstiel-fortis-21049292-0- JlHR5nOi-l.jpg",
 "number_of_products": "4",
 "final_gross_price": "822",
 "final_net_price": "691",
 "base_gross_price": null,
 "base_price_unit": null,
 "url": "/handwerkzeug/fortis-faeustel-mit-eschen-stiel-SP11968"
 },
 "search_data": [
 {
 "full_text": " 21049289 4317784792714 04317784792714 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "full_text_boosted": " Fortis Fäustel DIN6475 1000g Eschenstiel FORTIS 1000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen-Stiel Fortis Fäustel, mit Eschen-Stiel",
 "string_facet": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "1000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 822
 }
 ]
 },
 {
 "full_text": " 21049290 4317784792721 04317784792721 Fäustel DIN Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this! full-text search
  10. 10. {
 "type": "staple",
 "search_result_data": {
 "sku": "SP11968",
 "name": "Fortis Fäustel, mit Eschen-Stiel",
 "preview_image": "faeustel-din6475-2000g-eschenstiel-fortis-21049292-0- JlHR5nOi-l.jpg",
 "number_of_products": "4",
 "final_gross_price": "822",
 "final_net_price": "691",
 "base_gross_price": null,
 "base_price_unit": null,
 "url": "/handwerkzeug/fortis-faeustel-mit-eschen-stiel-SP11968"
 },
 "search_data": [
 {
 "full_text": " 21049289 4317784792714 04317784792714 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "full_text_boosted": " Fortis Fäustel DIN6475 1000g Eschenstiel FORTIS 1000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen-Stiel Fortis Fäustel, mit Eschen-Stiel",
 "string_facet": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "1000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 822
 }
 ]
 },
 {
 "full_text": " 21049290 4317784792721 04317784792721 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende. SP11968 SP11968",
 "full_text_boosted": " Fortis Fäustel DIN6475 1250g Eschenstiel FORTIS 1250 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen-Stiel Fortis Fäustel, mit Eschen-Stiel",
 "string_facet": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this! faceted navigation
  11. 11. {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 1194
 }
 ]
 }
 ],
 "completion_terms": [
 "Fortis",
 "1000",
 "1250",
 "1500",
 "2000",
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "suggestion_terms": [
 "Fortis Fäustel, mit Eschen-Stiel"
 ],
 "number_sort": {
 "final_gross_price": 822
 },
 "string_sort": {
 "name": "Fortis Fäustel, mit Eschen-Stiel"
 },
 "scores": {
 "top_seller": 0.91,
 "pdp_impressions": 0.38,
 "sale_impressions_rate": 0.8,
 "data_quality": 0.87,
 "delivery_speed": 0.85,
 "random": 0.75,
 "stock": 1
 },
 "category": {
 "direct_parents": [
 "bpka"
 ],
 "all_parents": [
 "bost",
 "boum",
 "boun",
 "bpka"
 ],
 Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this! completion
  12. 12. {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 1194
 }
 ]
 }
 ],
 "completion_terms": [
 "Fortis",
 "1000",
 "1250",
 "1500",
 "2000",
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "suggestion_terms": [
 "Fortis Fäustel, mit Eschen-Stiel"
 ],
 "number_sort": {
 "final_gross_price": 822
 },
 "string_sort": {
 "name": "Fortis Fäustel, mit Eschen-Stiel"
 },
 "scores": {
 "top_seller": 0.91,
 "pdp_impressions": 0.38,
 "sale_impressions_rate": 0.8,
 "data_quality": 0.87,
 "delivery_speed": 0.85,
 "random": 0.75,
 "stock": 1
 },
 "category": {
 "direct_parents": [
 "bpka"
 ],
 "all_parents": [
 "bost",
 "boum",
 "boun",
 "bpka"
 ],
 Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this! spell-checking
  13. 13. {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 1194
 }
 ]
 }
 ],
 "completion_terms": [
 "Fortis",
 "1000",
 "1250",
 "1500",
 "2000",
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "suggestion_terms": [
 "Fortis Fäustel, mit Eschen-Stiel"
 ],
 "number_sort": {
 "final_gross_price": 822
 },
 "string_sort": {
 "name": "Fortis Fäustel, mit Eschen-Stiel"
 },
 "scores": {
 "top_seller": 0.91,
 "pdp_impressions": 0.38,
 "sale_impressions_rate": 0.8,
 "data_quality": 0.87,
 "delivery_speed": 0.85,
 "random": 0.75,
 "stock": 1
 },
 "category": {
 "direct_parents": [
 "bpka"
 ],
 "all_parents": [
 "bost",
 "boum",
 "boun",
 "bpka"
 ],
 Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this! static sorting
  14. 14. {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 1194
 }
 ]
 }
 ],
 "completion_terms": [
 "Fortis",
 "1000",
 "1250",
 "1500",
 "2000",
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "suggestion_terms": [
 "Fortis Fäustel, mit Eschen-Stiel"
 ],
 "number_sort": {
 "final_gross_price": 822
 },
 "string_sort": {
 "name": "Fortis Fäustel, mit Eschen-Stiel"
 },
 "scores": {
 "top_seller": 0.91,
 "pdp_impressions": 0.38,
 "sale_impressions_rate": 0.8,
 "data_quality": 0.87,
 "delivery_speed": 0.85,
 "random": 0.75,
 "stock": 1
 },
 "category": {
 "direct_parents": [
 "bpka"
 ],
 "all_parents": [
 "bost",
 "boum",
 "boun",
 "bpka"
 ],
 Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this! dynamic result ranking
  15. 15. {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 }
 ],
 "number_facet": [
 {
 "facet-name": "final_gross_price",
 "facet-value": 1194
 }
 ]
 }
 ],
 "completion_terms": [
 "Fortis",
 "1000",
 "1250",
 "1500",
 "2000",
 "Fäustel",
 "Handwerkzeug",
 "Hammer",
 "Fäustel"
 ],
 "suggestion_terms": [
 "Fortis Fäustel, mit Eschen-Stiel"
 ],
 "number_sort": {
 "final_gross_price": 822
 },
 "string_sort": {
 "name": "Fortis Fäustel, mit Eschen-Stiel"
 },
 "scores": {
 "top_seller": 0.91,
 "pdp_impressions": 0.38,
 "sale_impressions_rate": 0.8,
 "data_quality": 0.87,
 "delivery_speed": 0.85,
 "random": 0.75,
 "stock": 1
 },
 "category": {
 "direct_parents": [
 "bpka"
 ],
 "all_parents": [
 "bost",
 "boum",
 "boun",
 "bpka"
 ],
 Usage driven schema & document structure ‣ How do you want to use the attributes of your documents?
 ‣ 3 / 19https://goo.gl/xJr9Js ‣Do this! ‣ Analyse attributes differently depending on their use • Best representation for each use case • Intelligence moves to importers
  16. 16. ‣ Faceted navigation 4 / 19https://goo.gl/xJr9Js
  17. 17. ‣ Faceted navigation 4 / 19https://goo.gl/xJr9Js Facet counting
  18. 18. ‣ Faceted navigation 4 / 19https://goo.gl/xJr9Js Filtering
  19. 19. Faceted navigation: the standard way ‣ Put all filterable attributes in unanalyzed document field:
 ‣ 5 / 19https://goo.gl/xJr9Js ‣Does not scale to open-ended number of facets "string_facets" : {
 "manufacturer": "Fortis",
 "hammer_weight": "2000",
 "hammer_color": "Red"
 }

  20. 20. Faceted navigation: the standard way ‣ Put all filterable attributes in unanalyzed document field:
 ‣ 5 / 19https://goo.gl/xJr9Js ‣Does not scale to open-ended number of facets "string_facets" : {
 "manufacturer": "Fortis",
 "hammer_weight": "2000",
 "hammer_color": "Red"
 }
 "aggregations": {
 "facet_manufacturer": {
 "terms": {
 "field": "string_facets.manufacturer"
 }
 },
 "facet_hammer_weight": {
 "terms": {
 "field": "string_facets.hammer_weight"
 }
 },
 "facet_hammer_color": {
 "terms": {
 "field": "string_facets.hammer_color"
 }
 }
 } ‣ Explicitly list all facets in the query:
  21. 21. ! ‣ Generic faceted navigation / 19https://goo.gl/xJr9Js ‣Nicely scales to thousands of facets ‣ Put facet names as values in documents: "string_facets": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 },
 {
 "facet-name": "hammer_color",
 "facet-value": "Red"
 }
 ] 6
  22. 22. ! ‣ Generic faceted navigation / 19https://goo.gl/xJr9Js ‣Nicely scales to thousands of facets ‣ Put facet names as values in documents: "string_facets": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 },
 {
 "facet-name": "hammer_color",
 "facet-value": "Red"
 }
 ] ‣ Mark string_facets field as “nested” in document: "string_facets": {
 "type": "nested",
 "properties": {
 "facet-name": {
 "type": "string",
 "index": "not_analyzed"
 },
 "facet-value": {
 "type": "string",
 "index": "not_analyzed"
 }
 }
 } 6
  23. 23. Generic faceted navigation / 19https://goo.gl/xJr9Js ‣Nicely scales to thousands of facets ‣ Put facet names as values in documents: "string_facets": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 },
 {
 "facet-name": "hammer_color",
 "facet-value": "Red"
 }
 ] ‣ Nested query with nested aggregation: "aggregations": {
 "agg_string_facet": {
 "nested": {
 "path": "string_facets"
 },
 "aggregations": {
 "facet_name": {
 "terms": {
 "field": "string_facets.facet-name"
 },
 "aggregations": {
 "facet_value": {
 "terms": {
 "field": "string_facets.facet-value"
 }
 }
 }
 }
 }
 }
 }
 
 ! ‣ Mark string_facets field as “nested” in document: "string_facets": {
 "type": "nested",
 "properties": {
 "facet-name": {
 "type": "string",
 "index": "not_analyzed"
 },
 "facet-value": {
 "type": "string",
 "index": "not_analyzed"
 }
 }
 } 6
  24. 24. Generic faceted navigation / 19https://goo.gl/xJr9Js ‣Nicely scales to thousands of facets ‣ Put facet names as values in documents: "string_facets": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 },
 {
 "facet-name": "hammer_color",
 "facet-value": "Red"
 }
 ] ‣ Nested query with nested aggregation: "aggregations": {
 "agg_string_facet": {
 "nested": {
 "path": "string_facets"
 },
 "aggregations": {
 "facet_name": {
 "terms": {
 "field": "string_facets.facet-name"
 },
 "aggregations": {
 "facet_value": {
 "terms": {
 "field": "string_facets.facet-value"
 }
 }
 }
 }
 }
 }
 }
 
 ! ‣ Mark string_facets field as “nested” in document: "string_facets": {
 "type": "nested",
 "properties": {
 "facet-name": {
 "type": "string",
 "index": "not_analyzed"
 },
 "facet-value": {
 "type": "string",
 "index": "not_analyzed"
 }
 }
 } 6 "filter": {
 "nested": {
 "path": "string_facets",
 "filter": {
 "bool": {
 "must": [
 {
 "term": {
 "facets.facet-name": "hammer_weight"
 }
 },
 {
 "terms": {
 "facets.facet-value": [
 "2000"
 ]
 }
 }
 ]
 }
 }
 }
 } 
 ! ‣ Nested filter:
  25. 25. Generic faceted navigation / 19https://goo.gl/xJr9Js ‣Nicely scales to thousands of facets ‣ Put facet names as values in documents: "string_facets": [
 {
 "facet-name": "manufacturer",
 "facet-value": "Fortis"
 },
 {
 "facet-name": "hammer_weight",
 "facet-value": "2000"
 },
 {
 "facet-name": "hammer_color",
 "facet-value": "Red"
 }
 ] ‣ Nested query with nested aggregation: "aggregations": {
 "agg_string_facet": {
 "nested": {
 "path": "string_facets"
 },
 "aggregations": {
 "facet_name": {
 "terms": {
 "field": "string_facets.facet-name"
 },
 "aggregations": {
 "facet_value": {
 "terms": {
 "field": "string_facets.facet-value"
 }
 }
 }
 }
 }
 }
 }
 
 ! ‣ Mark string_facets field as “nested” in document: "string_facets": {
 "type": "nested",
 "properties": {
 "facet-name": {
 "type": "string",
 "index": "not_analyzed"
 },
 "facet-value": {
 "type": "string",
 "index": "not_analyzed"
 }
 }
 } 6 "filter": {
 "nested": {
 "path": "string_facets",
 "filter": {
 "bool": {
 "must": [
 {
 "term": {
 "facets.facet-name": "hammer_weight"
 }
 },
 {
 "terms": {
 "facets.facet-value": [
 "2000"
 ]
 }
 }
 ]
 }
 }
 }
 } 
 ! ‣ Nested filter: ‣ The front-end doesn’t need to know which facets exist
  26. 26. Full-text search ‣ 7 / 19https://goo.gl/xJr9Js
  27. 27. Full-text search ‣ 7 / 19https://goo.gl/xJr9Js
  28. 28. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains
  29. 29. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains Stiel für Schonhammer 800g
  30. 30. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains Stiel für Schonhammer 800g Stiel für Schonhammer 800g Whitespace tokenizer
  31. 31. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains Stiel für Schonhammer 800g Stiel für Schonhammer 800g Whitespace tokenizer Stiel für Schonhammer 800g 800 g Word-delimiter filter
  32. 32. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains Stiel für Schonhammer 800g Stiel für Schonhammer 800g Whitespace tokenizer Stiel für Schonhammer 800g 800 g Word-delimiter filter stiel für schonhammer 800g 800 g Lowercase filter
  33. 33. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains Stiel für Schonhammer 800g Stiel für Schonhammer 800g Whitespace tokenizer Stiel für Schonhammer 800g 800 g Word-delimiter filter stiel für schonhammer 800g 800 g Lowercase filter stiel für schonhammer plastikhammer 800g 800 g Synonym filter
  34. 34. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains Stiel für Schonhammer 800g Stiel für Schonhammer 800g Whitespace tokenizer Stiel für Schonhammer 800g 800 g Word-delimiter filter stiel für schonhammer 800g 800 g Lowercase filter stiel für schonhammer plastikhammer 800g 800 g Synonym filter stiel für schonhammer schon hammer plastikhammer plastik hammer 800g 800 g Decompounder filter
  35. 35. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains Stiel für Schonhammer 800g Stiel für Schonhammer 800g Whitespace tokenizer Stiel für Schonhammer 800g 800 g Word-delimiter filter stiel für schonhammer 800g 800 g Lowercase filter stiel für schonhammer plastikhammer 800g 800 g Synonym filter stiel für schonhammer schon hammer plastikhammer plastik hammer 800g 800 g Decompounder filter stiel fur schonhammer schon hammer plastikhammer plastik hammer 800g 800 g German normalization filter
  36. 36. Text analysis ‣ Pre-built Elasticsearch analyzers work, but won’t give the best user experience 8 / 19https://goo.gl/xJr9Js ‣Invest time in in building proper text analysis chains Stiel für Schonhammer 800g Stiel für Schonhammer 800g Whitespace tokenizer Stiel für Schonhammer 800g 800 g Word-delimiter filter stiel für schonhammer 800g 800 g Lowercase filter stiel für schonhammer plastikhammer 800g 800 g Synonym filter stiel für schonhammer schon hammer plastikhammer plastik hammer 800g 800 g Decompounder filter stiel fur schonhammer schon hammer plastikhammer plastik hammer 800g 800 g German normalization filter stiel fur schonhamm scho hamm plastikhamm plastik hamm 800g 800 g German stemmer filter
  37. 37. Text relevance ‣ Split searchable text by importance in documents: 9 / 19https://goo.gl/xJr9Js ‣Improve relevance by combining multiple analyzers "full_text": "21049291 4317784792738 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende SP11968",
 "full_text_boosted": "Fortis Fäustel DIN6475 2000g Eschenstiel FORTIS 2000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen- Stiel Fortis Fäustel, mit Eschen-Stiel"

  38. 38. Text relevance ‣ Split searchable text by importance in documents: 9 / 19https://goo.gl/xJr9Js ‣Improve relevance by combining multiple analyzers "full_text": "21049291 4317784792738 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende SP11968",
 "full_text_boosted": "Fortis Fäustel DIN6475 2000g Eschenstiel FORTIS 2000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen- Stiel Fortis Fäustel, mit Eschen-Stiel"
 "properties": {
 "full_text": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer",
 "search_analyzer": "full_text_search_analyzer",
 "fields": {
 "no-decompound": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_decompound",
 "search_analyzer": "full_text_search_analyzer_no_decompound"
 },
 "no-stem": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_stem",
 "search_analyzer": "full_text_search_analyzer_no_stem"
 }
 }
 }
 } ‣ Apply multiple analyzers to full-text fields in mapping:
  39. 39. Text relevance ‣ Split searchable text by importance in documents: 9 / 19https://goo.gl/xJr9Js ‣Improve relevance by combining multiple analyzers "full_text": "21049291 4317784792738 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende SP11968",
 "full_text_boosted": "Fortis Fäustel DIN6475 2000g Eschenstiel FORTIS 2000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen- Stiel Fortis Fäustel, mit Eschen-Stiel"
 "properties": {
 "full_text": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer",
 "search_analyzer": "full_text_search_analyzer",
 "fields": {
 "no-decompound": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_decompound",
 "search_analyzer": "full_text_search_analyzer_no_decompound"
 },
 "no-stem": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_stem",
 "search_analyzer": "full_text_search_analyzer_no_stem"
 }
 }
 }
 } ‣ Apply multiple analyzers to full-text fields in mapping: "query": {
 "bool": {
 "must": [
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted^7",
 "search_data.full_text^2"
 ],
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer",
 "query": "hammer"
 }
 }
 ],
 "should": [
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted.no-stem^7",
 "search_data.full_text.no-stem^2"
 ],
 "operator": "OR",
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer_no_stem",
 "query": "hammer"
 }
 },
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted.no-decompound^7",
 "search_data.full_text.no-decompound^2"
 ],
 "operator": "OR",
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer_no_decompound",
 "query": "hammer"
 }
 }
 ]
 }
 } ‣ Combine subqueries to get more relevant results
  40. 40. Text relevance ‣ Split searchable text by importance in documents: 9 / 19https://goo.gl/xJr9Js ‣Improve relevance by combining multiple analyzers "full_text": "21049291 4317784792738 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende SP11968",
 "full_text_boosted": "Fortis Fäustel DIN6475 2000g Eschenstiel FORTIS 2000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen- Stiel Fortis Fäustel, mit Eschen-Stiel"
 "properties": {
 "full_text": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer",
 "search_analyzer": "full_text_search_analyzer",
 "fields": {
 "no-decompound": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_decompound",
 "search_analyzer": "full_text_search_analyzer_no_decompound"
 },
 "no-stem": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_stem",
 "search_analyzer": "full_text_search_analyzer_no_stem"
 }
 }
 }
 } ‣ Apply multiple analyzers to full-text fields in mapping: "query": {
 "bool": {
 "must": [
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted^7",
 "search_data.full_text^2"
 ],
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer",
 "query": "hammer"
 }
 }
 ],
 "should": [
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted.no-stem^7",
 "search_data.full_text.no-stem^2"
 ],
 "operator": "OR",
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer_no_stem",
 "query": "hammer"
 }
 },
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted.no-decompound^7",
 "search_data.full_text.no-decompound^2"
 ],
 "operator": "OR",
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer_no_decompound",
 "query": "hammer"
 }
 }
 ]
 }
 } ‣ Combine subqueries to get more relevant results
  41. 41. Text relevance ‣ Split searchable text by importance in documents: 9 / 19https://goo.gl/xJr9Js ‣Improve relevance by combining multiple analyzers "full_text": "21049291 4317784792738 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende SP11968",
 "full_text_boosted": "Fortis Fäustel DIN6475 2000g Eschenstiel FORTIS 2000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen- Stiel Fortis Fäustel, mit Eschen-Stiel"
 "properties": {
 "full_text": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer",
 "search_analyzer": "full_text_search_analyzer",
 "fields": {
 "no-decompound": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_decompound",
 "search_analyzer": "full_text_search_analyzer_no_decompound"
 },
 "no-stem": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_stem",
 "search_analyzer": "full_text_search_analyzer_no_stem"
 }
 }
 }
 } ‣ Apply multiple analyzers to full-text fields in mapping: "query": {
 "bool": {
 "must": [
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted^7",
 "search_data.full_text^2"
 ],
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer",
 "query": "hammer"
 }
 }
 ],
 "should": [
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted.no-stem^7",
 "search_data.full_text.no-stem^2"
 ],
 "operator": "OR",
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer_no_stem",
 "query": "hammer"
 }
 },
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted.no-decompound^7",
 "search_data.full_text.no-decompound^2"
 ],
 "operator": "OR",
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer_no_decompound",
 "query": "hammer"
 }
 }
 ]
 }
 } ‣ Combine subqueries to get more relevant results
  42. 42. Text relevance ‣ Split searchable text by importance in documents: 9 / 19https://goo.gl/xJr9Js ‣Improve relevance by combining multiple analyzers "full_text": "21049291 4317784792738 Fäustel DIN 6475<br><br>Stahlgeschmiedet, Kopf schwarz lackiert, Bahnen poliert, doppelt geschweifter Eschenstiel mit ozeanblau lackiertem Handende SP11968",
 "full_text_boosted": "Fortis Fäustel DIN6475 2000g Eschenstiel FORTIS 2000 Fäustel Handwerkzeug Hammer Fäustel Fortis Fäustel, mit Eschen- Stiel Fortis Fäustel, mit Eschen-Stiel"
 "properties": {
 "full_text": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer",
 "search_analyzer": "full_text_search_analyzer",
 "fields": {
 "no-decompound": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_decompound",
 "search_analyzer": "full_text_search_analyzer_no_decompound"
 },
 "no-stem": {
 "type": "string",
 "index_analyzer": "full_text_index_analyzer_no_stem",
 "search_analyzer": "full_text_search_analyzer_no_stem"
 }
 }
 }
 } ‣ Apply multiple analyzers to full-text fields in mapping: "query": {
 "bool": {
 "must": [
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted^7",
 "search_data.full_text^2"
 ],
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer",
 "query": "hammer"
 }
 }
 ],
 "should": [
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted.no-stem^7",
 "search_data.full_text.no-stem^2"
 ],
 "operator": "OR",
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer_no_stem",
 "query": "hammer"
 }
 },
 {
 "multi_match": {
 "fields": [
 "search_data.full_text_boosted.no-decompound^7",
 "search_data.full_text.no-decompound^2"
 ],
 "operator": "OR",
 "type": "cross_fields",
 "analyzer": "full_text_search_analyzer_no_decompound",
 "query": "hammer"
 }
 }
 ]
 }
 } ‣ Combine subqueries to get more relevant results
  43. 43. Data driven ranking 10 / 19https://goo.gl/xJr9Js ! ‣ ‣Align formula with business goals
  44. 44. Data driven ranking 10 / 19https://goo.gl/xJr9Js ! ‣ Result order ‣Align formula with business goals
  45. 45. Data driven ranking 10 / 19https://goo.gl/xJr9Js ! ‣‣ Add normalized scores to document that each reflect a heuristic what a “good” result is: "scores": {
 "top_seller": 0.91,
 "pdp_impressions": 0.38,
 "sale_impressions_rate": 0.68,
 "data_quality": 0.87,
 "delivery_speed": 0.85,
 "random": 0.75,
 "stock": 1
 } Result order ‣Align formula with business goals most scores left out due to their sensitive nature
  46. 46. Data driven ranking 10 / 19https://goo.gl/xJr9Js ! ‣‣ Add normalized scores to document that each reflect a heuristic what a “good” result is: "scores": {
 "top_seller": 0.91,
 "pdp_impressions": 0.38,
 "sale_impressions_rate": 0.68,
 "data_quality": 0.87,
 "delivery_speed": 0.85,
 "random": 0.75,
 "stock": 1
 } ‣ Concrete scores depend on business Result order ‣Align formula with business goals most scores left out due to their sensitive nature
  47. 47. Data driven ranking 10 / 19https://goo.gl/xJr9Js ! ‣‣ Add normalized scores to document that each reflect a heuristic what a “good” result is: "scores": {
 "top_seller": 0.91,
 "pdp_impressions": 0.38,
 "sale_impressions_rate": 0.68,
 "data_quality": 0.87,
 "delivery_speed": 0.85,
 "random": 0.75,
 "stock": 1
 } ‣ Concrete scores depend on business "query": {
 "filtered": {
 "query": {
 "function_score": {
 "score_mode": "first",
 "boost_mode": "replace",
 "query": {},
 "functions": [
 {
 "script_score": {
 "script": "
 (1 + _score ** 0.5)
 * doc['scores.stock'].value
 * (0.1 * doc['scores.random'].value + 0.3 * doc['scores.top_seller'].value + 0.1 * doc['scores.pdp_impressions'].value
 + 0.2 * doc['scores.sale_impressions_rate'].value + 0.1 * doc['scores.data_quality'].value + 0.3 * doc['scores.delivery_speed'].value)"
 }
 }
 ]
 }
 }
 } } ‣ Combine scores through algebraic formula in query: (actual weights replaced by random values) ‣Align formula with business goals most scores left out due to their sensitive nature
  48. 48. ‣ Example I: expected margin Normalized, evenly-distributed scores I 11 / 19https://goo.gl/xJr9Js ‣Look at the distribution of a measure across all products -0.2 0.0 0.2 0.4 0.6 0.8 1.0 05000100001500020000 0.00.51.0 0.5+atan((x−0.1)0.05)π computation of score expected_margin #products x = expected_margin data from 2014
  49. 49. ‣ Example I: expected margin Normalized, evenly-distributed scores I 11 / 19https://goo.gl/xJr9Js ‣Look at the distribution of a measure across all products -0.2 0.0 0.2 0.4 0.6 0.8 1.0 05000100001500020000 0.00.51.0 0.5+atan((x−0.1)0.05)π computation of score expected_margin #products x = expected_margin data from 2014 distribution of the expected margin across all products
  50. 50. ‣ Example I: expected margin Normalized, evenly-distributed scores I 11 / 19https://goo.gl/xJr9Js ‣Look at the distribution of a measure across all products -0.2 0.0 0.2 0.4 0.6 0.8 1.0 05000100001500020000 0.00.51.0 0.5+atan((x−0.1)0.05)π computation of score expected_margin #products x = expected_margin data from 2014 distribution of the expected margin across all products score function
  51. 51. ‣ Example I: expected margin Normalized, evenly-distributed scores I 11 / 19https://goo.gl/xJr9Js ‣Look at the distribution of a measure across all products -0.2 0.0 0.2 0.4 0.6 0.8 1.0 05000100001500020000 0.00.51.0 0.5+atan((x−0.1)0.05)π computation of score expected_margin #products x = expected_margin data from 2014 distribution of the expected margin across all products mean stdev score function
  52. 52. ‣ Example II: expected time of delivery Normalized, evenly-distributed scores II 12 / 19https://goo.gl/xJr9Js ‣Finding meaningful scores is a requirement for a good ranking 100 200 300 400 020000400006000080000 0.00.51.0 0.5−atan((x−48)12)π computation of score delivery_speed #products x = delivery_time data from 2014
  53. 53. ‣ Example II: expected time of delivery Normalized, evenly-distributed scores II 12 / 19https://goo.gl/xJr9Js ‣Finding meaningful scores is a requirement for a good ranking 100 200 300 400 020000400006000080000 0.00.51.0 0.5−atan((x−48)12)π computation of score delivery_speed #products x = delivery_time 48 hours = neutral → 0.5 data from 2014
  54. 54. ‣ Example II: expected time of delivery Normalized, evenly-distributed scores II 12 / 19https://goo.gl/xJr9Js ‣Finding meaningful scores is a requirement for a good ranking 100 200 300 400 020000400006000080000 0.00.51.0 0.5−atan((x−48)12)π computation of score delivery_speed #products x = delivery_time 48 hours = neutral → 0.5 60 hours = acceptable → 0.25 data from 2014
  55. 55. ‣ Example II: expected time of delivery Normalized, evenly-distributed scores II 12 / 19https://goo.gl/xJr9Js ‣Finding meaningful scores is a requirement for a good ranking 100 200 300 400 020000400006000080000 0.00.51.0 0.5−atan((x−48)12)π computation of score delivery_speed #products x = delivery_time 48 hours = neutral → 0.5 60 hours = acceptable → 0.25 bad data from 2014
  56. 56. ‣ Example II: expected time of delivery Normalized, evenly-distributed scores II 12 / 19https://goo.gl/xJr9Js ‣Finding meaningful scores is a requirement for a good ranking 100 200 300 400 020000400006000080000 0.00.51.0 0.5−atan((x−48)12)π computation of score delivery_speed #products x = delivery_time 48 hours = neutral → 0.5 good 60 hours = acceptable → 0.25 bad data from 2014
  57. 57. Multi-term auto-completion ! ‣ 13 / 19https://goo.gl/xJr9Js ‣Allow users to drill down to results by combining multiple attributes
  58. 58. Multi-term auto-completion ! ‣ 13 / 19https://goo.gl/xJr9Js ‣Allow users to drill down to results by combining multiple attributes "completion_terms": [
 "Fortis",
 "1000",
 "1250",
 "1500",
 "2000",
 "Fäustel",
 "Handwerkzeug",
 "Hammer"
 ] ‣ Put all terms to complete on in document
  59. 59. Multi-term auto-completion ! ‣ 13 / 19https://goo.gl/xJr9Js ‣Allow users to drill down to results by combining multiple attributes "completion_terms": [
 "Fortis",
 "1000",
 "1250",
 "1500",
 "2000",
 "Fäustel",
 "Handwerkzeug",
 "Hammer"
 ] ‣ Put all terms to complete on in document "completion_terms": {
 "type": "string",
 "analyzer": "completion_analyzer"
 } ‣ Leave terms more or less un-altered in mapping
  60. 60. Multi-term auto-completion ! ‣ 13 / 19https://goo.gl/xJr9Js ‣Allow users to drill down to results by combining multiple attributes "completion_terms": [
 "Fortis",
 "1000",
 "1250",
 "1500",
 "2000",
 "Fäustel",
 "Handwerkzeug",
 "Hammer"
 ] ‣ Put all terms to complete on in document "completion_terms": {
 "type": "string",
 "analyzer": "completion_analyzer"
 } ‣ Leave terms more or less un-altered in mapping "aggs": {
 "autocomplete": {
 "terms": {
 "field": "completion_terms",
 "size": 100
 }
 }
 } ‣ Filter by input, aggregate by terms in query
  61. 61. Simple spelling suggestions 14 / 19https://goo.gl/xJr9Js ‣Very easy to build, and customers expect it ! ‣
  62. 62. Simple spelling suggestions 14 / 19https://goo.gl/xJr9Js ‣Very easy to build, and customers expect it ! ‣ "suggestion_terms": [
 "Fortis Fäustel, mit Eschen-Stiel"
 ]
 ‣ Put high quality suggestion terms in document:
  63. 63. Simple spelling suggestions 14 / 19https://goo.gl/xJr9Js ‣Very easy to build, and customers expect it ! ‣ ‣ Apply a simple analyzer that that splits text by whitespace and that lowercases it: "suggestion_terms" : {
 "type" : "string",
 "analyzer" : "term_suggestion_analyzer",
 } "suggestion_terms": [
 "Fortis Fäustel, mit Eschen-Stiel"
 ]
 ‣ Put high quality suggestion terms in document:
  64. 64. Simple spelling suggestions 14 / 19https://goo.gl/xJr9Js ‣Very easy to build, and customers expect it ! ‣ ‣ Apply a simple analyzer that that splits text by whitespace and that lowercases it: "suggestion_terms" : {
 "type" : "string",
 "analyzer" : "term_suggestion_analyzer",
 } "suggestion_terms": [
 "Fortis Fäustel, mit Eschen-Stiel"
 ]
 ‣ Put high quality suggestion terms in document: ‣ Look for most similar term by distance in query: 
 "suggest": {
 "spelling-suggestion": {
 "text": "hammmer",
 "term": {
 "field": "suggestion_terms",
 "size": 1
 }
 }
 }

  65. 65. Personalization: dynamic pricing ‣ User specific discounts per product or category 15 / 19https://goo.gl/xJr9Js ‣Scripts can be used for many other types of user specific personalisations "query": {
 "script_fields": {
 "final_gross_price_discount": {
 "script": “ if (fixed_prices && fixed_prices[doc['sku'].value]) { return fixed_prices[doc['sku'].value] } if(!discounts) { return }; 
 def discount = 0; for (String i : doc['discount_categories']) { if(discounts[i] && discounts[i].value > discount) { discount = discounts[i].value } } if (discount > 0 && doc['prices.discount_gross_price_level_' + discount].value) { return doc['prices.discount_gross_price_level_' + discount].value }",
 "params": {
 "discounts": {
 "47": 5,
 "453": 2,
 "305": 7
 },
 "fixed_prices": {
 "210417044": 9999,
 "128553": 100
 }
 }
 }
 }
 }

  66. 66. Index pages, not products ‣ Usage driven schemas can be used for any kinds of searchable documents
 ‣ 16 / 19https://goo.gl/xJr9Js ‣Makes brands, categories, editorial content, etc. easily findable {
 "type": "cms-page",
 "search_result_data": {
 "id": "7",
 "title": "Versandkosten | contorion.de",
 "name": "Versandinformationen",
 "url": "/versandkosten"
 },
 "search_data": {
 "full_text_boosted": [
 "Versandinformationen"
 ],
 "full_text": [
 "<p>Die Versandkosten innerhalb Deutschlands betragen 5,95€ pro Bestellung. Ab einem Warenwert von 50 € liefert Contorion versandkostenfrei.</p><p>Contorion.de liefert im Moment nur nach Deutschland.</p>"
 ]
 }
 }
  67. 67. Explicit attribute management ‣ Conscious decisions have to be made about how to use each attribute ‣ An explicit representation makes things more maintainable 17 / 19https://goo.gl/xJr9Js ‣Bonus points for providing an UI attribute full text full text boosted string facet number facet completion terms suggestion terms search result data description ✓             manufacturer   ✓ ✓   ✓ ✓ ✓ name   ✓     ✓ ✓ ✓ sku   ✓         ✓ hammer_weight ✓   ✓   ✓     hammer_handle_length ✓     ✓       hammer_handle_material ✓   ✓   ✓     preview_image             ✓ url             ✓
  68. 68. Product management for search ‣ Best: concrete examples of how search should behave from a user perspective 18 / 19https://goo.gl/xJr9Js ‣If I search for a hammer, I want to find a hammer search term issue / expected result dev comment makita i would expect standard power tools on top (e.g., drilling machine), not a jacket & a laser Enhance WHF akkuschrauber I would expect more search word suggestions, not just Akkuschrauber-Set PM: In specification schleifscheibe no top sellers on top Add all categories, add popularity score to category ranking latt hammer should give back Latthammers first we might ne to recalibrate the search a little bit blindnietwerkzeug only gives back products called “Blindnietwerkzeug” but no Blindnietzange or Blindnietmutter-Handgerät and so on Please add Tokens to list bohrmaschine bosch top categories should be the ones that actually have “Bohrmaschine” as it’s name, not Bohrständer and stuff fixed tiefenmesschieber customers missing an “s” don’t get any results for TiefenmesSschieber very hard to fix klopapier synonym for “Toilettenpapier” please create synonyms yourself duebel doesn’t find products when “ä” is “ae” - that should happen for all umlaute fixed Handwaschpaste doesn’t find category bug
  69. 69. Product management for search ‣ Best: concrete examples of how search should behave from a user perspective 18 / 19https://goo.gl/xJr9Js ‣If I search for a hammer, I want to find a hammer search term issue / expected result dev comment makita i would expect standard power tools on top (e.g., drilling machine), not a jacket & a laser Enhance WHF akkuschrauber I would expect more search word suggestions, not just Akkuschrauber-Set PM: In specification schleifscheibe no top sellers on top Add all categories, add popularity score to category ranking latt hammer should give back Latthammers first we might ne to recalibrate the search a little bit blindnietwerkzeug only gives back products called “Blindnietwerkzeug” but no Blindnietzange or Blindnietmutter-Handgerät and so on Please add Tokens to list bohrmaschine bosch top categories should be the ones that actually have “Bohrmaschine” as it’s name, not Bohrständer and stuff fixed tiefenmesschieber customers missing an “s” don’t get any results for TiefenmesSschieber very hard to fix klopapier synonym for “Toilettenpapier” please create synonyms yourself duebel doesn’t find products when “ä” is “ae” - that should happen for all umlaute fixed Handwaschpaste doesn’t find category bug
  70. 70. Product management for search ‣ Best: concrete examples of how search should behave from a user perspective 18 / 19https://goo.gl/xJr9Js ‣If I search for a hammer, I want to find a hammer search term issue / expected result dev comment makita i would expect standard power tools on top (e.g., drilling machine), not a jacket & a laser Enhance WHF akkuschrauber I would expect more search word suggestions, not just Akkuschrauber-Set PM: In specification schleifscheibe no top sellers on top Add all categories, add popularity score to category ranking latt hammer should give back Latthammers first we might ne to recalibrate the search a little bit blindnietwerkzeug only gives back products called “Blindnietwerkzeug” but no Blindnietzange or Blindnietmutter-Handgerät and so on Please add Tokens to list bohrmaschine bosch top categories should be the ones that actually have “Bohrmaschine” as it’s name, not Bohrständer and stuff fixed tiefenmesschieber customers missing an “s” don’t get any results for TiefenmesSschieber very hard to fix klopapier synonym for “Toilettenpapier” please create synonyms yourself duebel doesn’t find products when “ä” is “ae” - that should happen for all umlaute fixed Handwaschpaste doesn’t find category bug
  71. 71. Product management for search ‣ Best: concrete examples of how search should behave from a user perspective 18 / 19https://goo.gl/xJr9Js ‣If I search for a hammer, I want to find a hammer search term issue / expected result dev comment makita i would expect standard power tools on top (e.g., drilling machine), not a jacket & a laser Enhance WHF akkuschrauber I would expect more search word suggestions, not just Akkuschrauber-Set PM: In specification schleifscheibe no top sellers on top Add all categories, add popularity score to category ranking latt hammer should give back Latthammers first we might ne to recalibrate the search a little bit blindnietwerkzeug only gives back products called “Blindnietwerkzeug” but no Blindnietzange or Blindnietmutter-Handgerät and so on Please add Tokens to list bohrmaschine bosch top categories should be the ones that actually have “Bohrmaschine” as it’s name, not Bohrständer and stuff fixed tiefenmesschieber customers missing an “s” don’t get any results for TiefenmesSschieber very hard to fix klopapier synonym for “Toilettenpapier” please create synonyms yourself duebel doesn’t find products when “ä” is “ae” - that should happen for all umlaute fixed Handwaschpaste doesn’t find category bug
  72. 72. ‣ Structure documents around the usage of attributes ‣ Index pages, not products
 
 19 / 19https://goo.gl/xJr9Js Conclusions
  73. 73. ‣ Structure documents around the usage of attributes ‣ Index pages, not products
 
 19 / 19https://goo.gl/xJr9Js https://goo.gl/xJr9Jshttp://project-a.github.io/on-site-search-design-patterns-for-e-commerce/ Conclusions
  74. 74. ‣ Structure documents around the usage of attributes ‣ Index pages, not products
 
 19 / 19https://goo.gl/xJr9Js ‣Thank you ! https://goo.gl/xJr9Jshttp://project-a.github.io/on-site-search-design-patterns-for-e-commerce/ Conclusions

×