Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Big Data:

Relevant search results (with elasticsearch)



Jettro Coenradie
AMSTERDAM 16-17 MAY 2017
RELEVANT SEARCH
RESULTS
RELEVANT -
SOMETHING DIRECTLY RELATED,
CONNECTED OR PERTINENT TO A TOPIC
Wikipedia
PRECISION
▸Make sure that all results are relevant
RECALL
▸Don’t hide relevant results
TRADE-OFF BETWEEN PRECISION AND RECALL
RELEVANT RESULTS
▸Ranked content based on the needs of
your users.
WHAT TO SEARCH FOR?
TEACH YOUR SEARCH ENGINE
IMPORTANT FEATURES ABOUT YOUR
CONTENT
CONTENT
▸ Album in Rolling Stone Top 500
of all times.
OK COMPUTER
RADIOHEAD
1997
CAPITOL
OK IS WHERE RADIOHEAD BEGAN PULL...
FEATURES
OK COMPUTER
RADIOHEAD
1997
CAPITOL
OK IS WHERE RADIOHEAD BEGAN PULLING AT THEIR
SOUND LIKE TAFFY, NOT WORRYING IF...
HELP YOUR SEARCH ENGINE TO RANK
DOCUMENTS USING SIGNALS IN YOUR
QUERIES.
ONLY ALBUMS FROM THE LABEL ‘CAPITOL’ ARE IMPORTANT
SIGNALS
SEARCHED WORD IN TITLE IS MORE IMPORTANT THAN IN INFORMATION
RE...
CALCULATE A SCORE
TF / IDF
HOW DOES SEARCH
WORK?
PURE JAVA IMPLEMENTATION
public class AlbumRepository {
private Set<Album> albums;
public List<Album> findAlbumsBy(String ...
MATCH YOUR SEARCH STRING TO THE AVAILABLE DOCUMENTS
LOWERCASING / TYPOS
PURE JAVA IMPLEMENTATION
SCORING/RANKING
STEMMING / SYNONYMS
public class AlbumRepository {
private Se...
SEARCH ENGINE
APPROACH
SEARCH ENGINE
APPROACH
QUERY VERSUS FILTER CONTEXT
▸ Query Context
▸ How well does this document match this query clause? (Score)
▸ Filter Contex...
USING THE INVERTED
INDEX
USING AN INVERTED INDEX
USING AN INVERTED INDEX
FROM TEXT TO TERMS
CREATING THE INVERTED INDEX
compelling melodies in songs like
"Masters of War" and "Blowin' in the Wind"
compelling melodies in songs like
"Masters of War" and "Blowin' in the Wind"
compelling
melodies
songs
like
masters
war
bl...
compelling melodies in songs like "Masters of War" and "Blowin' in the Wind"
compelling melodies in songs like Masters of ...
compelling melodies in songs like "Masters of War" and "Blowin' in the Wind"
compelling melodies in songs like Masters of ...
compelling melodies in songs like "Masters of War" and "Blowin' in the Wind"
compelling melodies in songs like Masters of ...
CREATING THE MAPPING
SPECIFYING THE FEATURES
{
"album": {
"properties": {
"id": { "type": "long" },
"album": {
"type": "keyword",
"fields": { "analyzed": { "type": "te...
START SEARCHING
MORE SEARCH
USE SYNONYMS
YOU TWO => U2
USE EDGE-NGRAMS
c
Coldplay
co
col
cold
coldp
coldpl
coldpla
coldplay
CONCLUDING
QUESTIONS
@jettroCoenradie
https://www.linkedin.com/in/jettro/
https://github.com/jettro
https://amsterdam.luminis.eu/auth...
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017
Prochain SlideShare
Chargement dans…5
×

Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017

You want to give your site visitors the best user experience. To accomplish this, your visitors can search as well as browse your content. Search is only relevant when results are meaningful to the visitor. In this talk, Jettro will introduce you to the concepts like precision, recall and relevancy. Jettro uses Examples to show concepts in the context of search, autocomplete, suggestions and grouping of results. Used technologies are Angular, Java and elasticsearch. After the presentation you'll have a good idea about the steps you need to take te present your visitors relevant results.

  • Identifiez-vous pour voir les commentaires

Relevant search results (with elasticsearch) - Jettro Coenradie - Codemotion Amsterdam 2017

  1. 1. Big Data:
 Relevant search results (with elasticsearch)
 
 Jettro Coenradie AMSTERDAM 16-17 MAY 2017
  2. 2. RELEVANT SEARCH RESULTS
  3. 3. RELEVANT - SOMETHING DIRECTLY RELATED, CONNECTED OR PERTINENT TO A TOPIC Wikipedia
  4. 4. PRECISION ▸Make sure that all results are relevant
  5. 5. RECALL ▸Don’t hide relevant results
  6. 6. TRADE-OFF BETWEEN PRECISION AND RECALL
  7. 7. RELEVANT RESULTS ▸Ranked content based on the needs of your users.
  8. 8. WHAT TO SEARCH FOR?
  9. 9. TEACH YOUR SEARCH ENGINE IMPORTANT FEATURES ABOUT YOUR CONTENT
  10. 10. CONTENT ▸ Album in Rolling Stone Top 500 of all times. OK COMPUTER RADIOHEAD 1997 CAPITOL OK IS WHERE RADIOHEAD BEGAN PULLING AT THEIR SOUND LIKE TAFFY, NOT WORRYING IF IT WAS STILL "ROCK." THE RESULT IS A SLOW, HAUNTING ALBUM WITH UNFORGETTABLE TRACKS SUCH AS "KARMA POLICE" AND "PARANOID ANDROID." GUITARIST JONNY GREENWOOD ARRANGED WHITE-NOISE STRINGS, AND THOM YORKE MADE ALIENATION FEEL ALLURING.
  11. 11. FEATURES OK COMPUTER RADIOHEAD 1997 CAPITOL OK IS WHERE RADIOHEAD BEGAN PULLING AT THEIR SOUND LIKE TAFFY, NOT WORRYING IF IT WAS STILL "ROCK." THE RESULT IS A SLOW, HAUNTING ALBUM WITH UNFORGETTABLE TRACKS SUCH AS "KARMA POLICE" AND "PARANOID ANDROID." GUITARIST JONNY GREENWOOD ARRANGED WHITE-NOISE STRINGS, AND THOM YORKE MADE ALIENATION FEEL ALLURING. 162 TITLE ARTIST CREATION YEAR LABEL INFORMATION LIST RANK
  12. 12. HELP YOUR SEARCH ENGINE TO RANK DOCUMENTS USING SIGNALS IN YOUR QUERIES.
  13. 13. ONLY ALBUMS FROM THE LABEL ‘CAPITOL’ ARE IMPORTANT SIGNALS SEARCHED WORD IN TITLE IS MORE IMPORTANT THAN IN INFORMATION RECENT ALBUMS ARE MORE IMPORTANT THAN OLDER ALBUMS HIGHER RANKED ALBUMS ARE MORE IMPORTANT
  14. 14. CALCULATE A SCORE TF / IDF
  15. 15. HOW DOES SEARCH WORK?
  16. 16. PURE JAVA IMPLEMENTATION public class AlbumRepository { private Set<Album> albums; public List<Album> findAlbumsBy(String search, int from, int to){ return albums.stream() .filter(a -> (a.getYear() >= from && a.getYear() <= to)) .filter(a -> a.getInformation().contains(search)) .collect(toList()); } }
  17. 17. MATCH YOUR SEARCH STRING TO THE AVAILABLE DOCUMENTS
  18. 18. LOWERCASING / TYPOS PURE JAVA IMPLEMENTATION SCORING/RANKING STEMMING / SYNONYMS public class AlbumRepository { private Set<Album> albums; public List<Album> findAlbumsBy(String search, int from, int to){ return albums.stream() .filter(a -> (a.getYear() >= from && a.getYear() <= to)) .filter(a -> a.getInformation().contains(search)) .collect(toList()); } }
  19. 19. SEARCH ENGINE APPROACH
  20. 20. SEARCH ENGINE APPROACH
  21. 21. QUERY VERSUS FILTER CONTEXT ▸ Query Context ▸ How well does this document match this query clause? (Score) ▸ Filter Context ▸ Does this document match this query clause? (true or false)
  22. 22. USING THE INVERTED INDEX
  23. 23. USING AN INVERTED INDEX
  24. 24. USING AN INVERTED INDEX
  25. 25. FROM TEXT TO TERMS CREATING THE INVERTED INDEX
  26. 26. compelling melodies in songs like "Masters of War" and "Blowin' in the Wind"
  27. 27. compelling melodies in songs like "Masters of War" and "Blowin' in the Wind" compelling melodies songs like masters war blowin wind
  28. 28. compelling melodies in songs like "Masters of War" and "Blowin' in the Wind" compelling melodies in songs like Masters of War and Blowin in the Wind
  29. 29. compelling melodies in songs like "Masters of War" and "Blowin' in the Wind" compelling melodies in songs like Masters of War and Blowin in the Wind compelling melodies in songs like Masters of War and Blowin in the Wind
  30. 30. compelling melodies in songs like "Masters of War" and "Blowin' in the Wind" compelling melodies in songs like Masters of War and Blowin in the Wind compelling melodies in songs like Masters of War and Blowin in the Wind compelling melodies in songs like masters of war and blowin in the wind Lowercase compelling melodies in songs like masters of war and blowin in the wind Stop words compelling melodies songs like masters war blowin wind Synonyms storm
  31. 31. CREATING THE MAPPING SPECIFYING THE FEATURES
  32. 32. { "album": { "properties": { "id": { "type": "long" }, "album": { "type": "keyword", "fields": { "analyzed": { "type": "text" } } }, "artist": { "type": "keyword", "fields": { "analyzed": { "type": "text"} } }, "image": { "type": "keyword" }, "information": { "type": "text" }, "label": { "type": "keyword" }, "order": { "type": "long" }, "sequence": { "type": "long" }, "tags": { "type": "keyword" }, "year": { "type": "long" } } } }
  33. 33. START SEARCHING
  34. 34. MORE SEARCH
  35. 35. USE SYNONYMS
  36. 36. YOU TWO => U2
  37. 37. USE EDGE-NGRAMS
  38. 38. c Coldplay co col cold coldp coldpl coldpla coldplay
  39. 39. CONCLUDING
  40. 40. QUESTIONS @jettroCoenradie https://www.linkedin.com/in/jettro/ https://github.com/jettro https://amsterdam.luminis.eu/author/jettro/ https://rolling500.luminis.amsterdam

×