$30 off During Our Annual Pro Sale. View Details »

Making WordPress Search Kick-ass with Elasticsearch

Making WordPress Search Kick-ass with Elasticsearch

Discover the power that is Elasticsearch! Supercharge your site with the ability to implement autosuggest, fuzzy matching, search facets and relevant results in your next project. We’ll discuss why search is important, what Elasticsearch is and what it is capable of.

Aaron Holbrook

May 14, 2014
Tweet

More Decks by Aaron Holbrook

Other Decks in Programming

Transcript

  1. Making WordPress Search Kick-ass with
    Elasticsearch
    aaronjholbrook
    aaronjholbrook.com

    View Slide

  2. View Slide

  3. Why is search important?

    View Slide

  4. More than half of all users are search dominant
    http://www.nngroup.com/articles/search-and-you-may-find/

    View Slide

  5. Search lets users control their own destiny
    “I don't want to have to navigate this site the way they want me to. I
    just want to find the thing I'm looking for.”
    http://www.nngroup.com/articles/search-visible-and-simple/

    View Slide

  6. View Slide

  7. Search is users’ escape hatch when they are stuck
    Make it easy to use, make it available
    http://www.nngroup.com/articles/search-visible-and-simple/

    View Slide

  8. View Slide

  9. View Slide

  10. Assume most users will be unwilling or
    unable to refine their search query
    http://www.nngroup.com/articles/search-visible-and-simple/

    View Slide

  11. View Slide

  12. Emphasis should be on increasing users’
    success on their first search attempt
    http://www.nngroup.com/articles/search-visible-and-simple/

    View Slide

  13. Help users succeed before they even hit enter

    View Slide

  14. Most users cannot use advanced
    search or Boolean query syntax
    http://www.nngroup.com/articles/search-visible-and-simple/

    View Slide

  15. Emphasize your search engine’s ability to handle simple
    queries and still produce high-quality results
    http://www.nngroup.com/articles/search-navigation/

    View Slide

  16. View Slide

  17. WordPress Search (sucks)

    View Slide

  18. Poor Performance

    View Slide

  19. Inflexible and rigid matching algorithms
    (match based on regular expression)

    View Slide

  20. Does not comprehend typos or ‘close’ words

    View Slide

  21. Does not search metadata or taxonomies

    View Slide

  22. Can not (easily) determine facets of results

    View Slide

  23. Relevancy of results is poor

    View Slide

  24. Improving WordPress Search

    View Slide

  25. Improving WordPress Search
    with
    Elasticsearch

    View Slide

  26. Elasticsearch is a search server based on Lucene. It provides a
    distributed, multitenant-capable full-text search engine with a
    RESTful web interface and schema-free JSON documents
    http://en.wikipedia.org/wiki/Elasticsearch

    View Slide

  27. Elasticsearch is a search server based on Lucene. It provides a
    distributed, multitenant-capable full-text search engine with a
    RESTful web interface and schema-free JSON documents
    http://en.wikipedia.org/wiki/Elasticsearch

    View Slide

  28. Elasticsearch is a search server based on Lucene. It provides a
    distributed, multitenant-capable full-text search engine with a
    RESTful web interface and schema-free JSON documents
    http://en.wikipedia.org/wiki/Elasticsearch

    View Slide

  29. Elasticsearch is a search server based on Lucene. It provides a
    distributed, multitenant-capable full-text search engine with a
    RESTful web interface and schema-free JSON documents
    http://en.wikipedia.org/wiki/Elasticsearch

    View Slide

  30. Elasticsearch is a search server based on Lucene. It provides a
    distributed, multitenant-capable full-text search engine with a
    RESTful web interface and schema-free JSON documents
    http://en.wikipedia.org/wiki/Elasticsearch

    View Slide

  31. Relevant results

    View Slide

  32. Relevant results
    Autosuggest

    View Slide

  33. View Slide

  34. Relevant results
    Autosuggest
    Fuzzy Matching

    View Slide

  35. View Slide

  36. Relevant results
    Autosuggest
    Fuzzy Matching
    Proximity Search

    View Slide

  37. Relevant results
    Autosuggest
    Fuzzy Matching
    Proximity Search
    Search Metadata

    View Slide

  38. Relevant results
    Autosuggest
    Fuzzy Matching
    Proximity Search
    Search Metadata
    Search Taxonomies

    View Slide

  39. Relevant results
    Autosuggest
    Fuzzy Matching
    Proximity Search
    Search Metadata
    Search Taxonomies
    Facets

    View Slide

  40. View Slide

  41. View Slide

  42. View Slide

  43. Many more features:
    http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search.html

    View Slide

  44. ElasticPress

    View Slide

  45. View Slide

  46. Install the Elasticsearch Application
    https://www.elastic.co/downloads/elasticsearch

    View Slide

  47. Install ElasticPress
    https://github.com/10up/ElasticPress

    View Slide

  48. Deep breath..

    View Slide

  49. Activate and connect to Elasticsearch address/port
    (default port is 9200)

    View Slide

  50. Success!

    View Slide

  51. Without ElasticPress With ElasticPress

    View Slide

  52. aaronjholbrook
    aaronjholbrook.com

    View Slide