SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Modernizing WordPress
Search with Elasticsearch
Who Am I?
• My name is Taylor Lovett
• Director of Web Engineering at 10up
• Open source community member
• WordPress core contributor
• ElasticPress team member
@tlovett12
Doesn’t WordPress have
search built-in?
WordPress Search is Rudimentary
• Only searches post title, content, and excerpt.
• Relies on MySQL and thus is slow.
• Relevancy calculations are poor and overly
simplistic.
• Not able to handle any advanced filtering.
Think Beyond Search
WordPress Complex Queries Are Slow
• Querying for posts that contain multiple meta
keys.
• Querying for posts that contain multiple
taxonomies.
What is Elasticsearch?
http://www.elastic.co
Elasticsearch
• Open-source search server written in Java
based on a technology called Lucene (open-
source search software by Apache).
• A standalone database server that provides a
RESTful interface to accept and store data in a
way that is optimized for search and multi-
dimensional queries.
• Extremely scalable, performant, and reliable
Elasticsearch
• Relevant results
• Performant aggregation queries
• Autosuggest
• Fuzzy matching
• Geographic searches and queries
• Filterable searches and queries
• Data weighting
• Much more
Get an Elasticsearch Server
• Very flexible and customizable. There is not
really a “one size fits all” setup. Generally, you
have two options:
• Option 1: Pay someone else to manage/host
your Elasticsearch cluster (SaaS)
• Option 2: Host your own cluster
Elasticsearch SaaS
• elasticpress.io
• qbox.io
• heroku.com
• elastic.co
What is ElasticPress?
https://wordpress.org/plugins/elasticpress
ElasticPress
ElasticPress is a fast and flexible search and
query engine for WordPress.
ElasticPress Features
• Instantly find the content you’re looking for. The
first time. Advanced relevancy algorithm which
includes date weighting, term/meta searching,
fuzzy matching, and more.
• Search and query across multiple blogs in a
multisite instance.
• Extremely performant related content widget.
ElasticPress Features
• Dramatically improve performance of admin queries to
assist editors in finding content.
• Indexes text inside of popular file types (pdf, ppt, doc,
etc), and adds those files types to search results.
• Autosuggest for search - suggest relevant content as
text is entered into the search field.
• WooCommerce integration that improves faceting and
product look up speed as well as order search in the
admin.
ElasticPress Requirements
• WordPress 3.7+
• An instance of Elasticsearch.
Installation
• Github: http://github.com/10up/elasticpress
• WordPress.org: http://wordpress.org/plugins/
elasticpress
Connect to Elasticsearch
Activate Features
Sync Your Content
Query API
Query Integration
new WP_Query( array(

’s’ => ‘search terms’,

‘author_name’ => ‘taylor’,

…

) );
new WP_Query( array(

’ep_integrate’ => ‘true’,

‘author_name’ => ‘taylor’,

…

) );
new WP_Query( array(

‘author_name’ => ‘taylor’,

…

) );
Advanced Query API
• Search taxonomy terms
• Filter by taxonomy terms (unlimited dimensions)
• Search post meta
• Filter by post meta (unlimited dimensions)
• Search authors
• Filter by authors
• Search across blogs in multisite
• Complex date filtering
• more!
Example Queries
new WP_Query( array(

’s’ => ‘vienna austria’,

‘sites’ => ‘all’,

) );
Example Queries
new WP_Query( array(

’s’ => ‘vienna austria’,

‘search_fields’ => array(

‘post_title’,

‘post_content’,

‘taxonomies’ => array( ‘category’ ),

),

) );
Example Queries
new WP_Query( array(

’s’ => ‘vienna austria’,

‘post_type’ => ‘page’,

‘author_name’ => ‘taylor’,

‘search_fields’ => array(

‘post_title’,

‘post_content’,

‘meta’ => array( ‘city_name’ ),

),

) );
Example Queries
new WP_Query( array(

’s’ => ‘vienna austria’,

‘tax_query’ => array(

array(

‘taxonomy’ => ‘category’,

‘terms’ => array( ‘term1’, ‘term2’ ),

),

),

‘search_fields’ => array(

‘post_title’,

‘post_content’,

‘meta’ => array( ‘city_name’ ),

‘author_name’,

),

‘site’ => 3,

) );
Example Queries
new WP_Query( array(

‘ep_integrate’ => true,

‘tax_query’ => array(

array(

‘taxonomy’ => ‘category’,

‘terms’ => array( ‘term1’, ‘term2’ ),

‘operator’ => ‘or’,

),

array(

‘taxonomy’ => ‘custom_tax’,

‘terms’ => array( ‘customterm1’ ),

),

array(

‘taxonomy’ => ‘post_tag’,

‘terms’ => array( ‘tag1’ ),

),

‘relation’ => ‘OR’,

),

) );
Example Queries
new WP_Query( array(

‘ep_integrate’ => true,

‘meta_query’ => array(

array(

‘key’ => ‘city_name’,

‘value’ => ‘vienna’,

),

array(

‘key’ => ‘number_key’,

‘value’ => 5,

‘compare’ => ‘>’,

),

array(

‘key’ => ‘exists_key’,

‘compare’ => ‘exists’,

),

),

) );
WP_Query Integration
• We want to be able to run all (slower) WP_Query
instances through Elasticsearch.
• This means we have to support every query
parameter which isn’t the case yet. Github
contains a full list of parameters WP_Query
supports with ElasticPress and usage for each
parameter.
ElasticPress in Your Language
• ElasticPress is designed to be internationalized.
• Out of the box, it will work fine with most
languages.
Analysis and Analyzers
• When a document is indexed in Elasticsearch,
text is analyzed, broken into terms (tokenized),
and normalized with token filters.
• In normalization, strings might be lowercased
and plurals stripped.
Custom Analyzers
• ElasticPress by default uses a pretty standard set of
analyzers intended for the English language.
• We can easily customize our analyzers for use with
other languages by filtering ep_config_mapping
(see EP source code).
• You can read about language specific analyzers here:



http://www.elasticsearch.org/guide/en/elasticsearch/
reference/current/analysis-lang-analyzer.html
Documentation
Full documentation with installation instructions:



https://github.com/10up/ElasticPress
Feedback and Continuing Development
• If you are using ElasticPress on a project, please
let us know and give us feedback.
• Pull requests are welcome!
Questions?
We need to send a PUT request to this endpoint with
our post data. Of course we must authenticate before
doing this.
@tlovett12
taylor.lovett@10up.com
http://elasticpress.io

Weitere ähnliche Inhalte

Was ist angesagt?

The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPressTaylor Lovett
 
Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Adam Tomat
 
Ako prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s ElasticsearchAko prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s Elasticsearchbart-sk
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it FastBarry Jones
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPressTaylor Lovett
 
Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)Chhom Karath
 
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesDjangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesNina Zakharenko
 
Get Django, Get Hired - An opinionated guide to getting the best job, for the...
Get Django, Get Hired - An opinionated guide to getting the best job, for the...Get Django, Get Hired - An opinionated guide to getting the best job, for the...
Get Django, Get Hired - An opinionated guide to getting the best job, for the...Marcel Chastain
 
Dcm#8 elastic search
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic searchIvan Wallarm
 
Beyond The Browser - Creating a RESTful Web Service With WordPress
Beyond The Browser - Creating a RESTful Web Service With WordPressBeyond The Browser - Creating a RESTful Web Service With WordPress
Beyond The Browser - Creating a RESTful Web Service With WordPressChristopher Reding
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009Jason Davies
 
Real World REST with Atom/AtomPub
Real World REST with Atom/AtomPubReal World REST with Atom/AtomPub
Real World REST with Atom/AtomPubPeter Keane
 
Software Development with Open Source
Software Development with Open SourceSoftware Development with Open Source
Software Development with Open SourceOpusVL
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDBOpusVL
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersBen van Mol
 
Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman
 

Was ist angesagt? (20)

The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPress
 
Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019
 
Ako prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s ElasticsearchAko prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s Elasticsearch
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it Fast
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)
 
Day 4 - Models
Day 4 - ModelsDay 4 - Models
Day 4 - Models
 
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesDjangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
 
Get Django, Get Hired - An opinionated guide to getting the best job, for the...
Get Django, Get Hired - An opinionated guide to getting the best job, for the...Get Django, Get Hired - An opinionated guide to getting the best job, for the...
Get Django, Get Hired - An opinionated guide to getting the best job, for the...
 
Dcm#8 elastic search
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic search
 
Beyond The Browser - Creating a RESTful Web Service With WordPress
Beyond The Browser - Creating a RESTful Web Service With WordPressBeyond The Browser - Creating a RESTful Web Service With WordPress
Beyond The Browser - Creating a RESTful Web Service With WordPress
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
Real World REST with Atom/AtomPub
Real World REST with Atom/AtomPubReal World REST with Atom/AtomPub
Real World REST with Atom/AtomPub
 
Software Development with Open Source
Software Development with Open SourceSoftware Development with Open Source
Software Development with Open Source
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDB
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET Developers
 
Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)
 
RSS Like A Ninja
RSS Like A NinjaRSS Like A Ninja
RSS Like A Ninja
 
Tornado my
Tornado myTornado my
Tornado my
 

Ähnlich wie Modernizing WordPress Search with Elasticsearch

Wordpress search-elasticsearch
Wordpress search-elasticsearchWordpress search-elasticsearch
Wordpress search-elasticsearchTaylor Lovett
 
PostgreSQL - It's kind've a nifty database
PostgreSQL - It's kind've a nifty databasePostgreSQL - It's kind've a nifty database
PostgreSQL - It's kind've a nifty databaseBarry Jones
 
Advanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAdvanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAsad Abbas
 
Full Text Search with Lucene
Full Text Search with LuceneFull Text Search with Lucene
Full Text Search with LuceneWO Community
 
Getting started with Laravel & Elasticsearch
Getting started with Laravel & ElasticsearchGetting started with Laravel & Elasticsearch
Getting started with Laravel & ElasticsearchPeter Steenbergen
 
Episerver and search engines
Episerver and search enginesEpiserver and search engines
Episerver and search enginesMikko Huilaja
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화NAVER D2
 
Elastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraElastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraMikko Huilaja
 
[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화Henry Jeong
 
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data AnalyticsAmazon Web Services
 
WEB-MODULE 4.pdf
WEB-MODULE 4.pdfWEB-MODULE 4.pdf
WEB-MODULE 4.pdfDeepika A B
 
AWS October Webinar Series - Introducing Amazon Elasticsearch Service
AWS October Webinar Series - Introducing Amazon Elasticsearch ServiceAWS October Webinar Series - Introducing Amazon Elasticsearch Service
AWS October Webinar Series - Introducing Amazon Elasticsearch ServiceAmazon Web Services
 
Examiness hints and tips from the trenches
Examiness hints and tips from the trenchesExaminess hints and tips from the trenches
Examiness hints and tips from the trenchesIsmail Mayat
 
An Introduction to Elastic Search.
An Introduction to Elastic Search.An Introduction to Elastic Search.
An Introduction to Elastic Search.Jurriaan Persyn
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMInfinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMJBug Italy
 
Search Engines: Best Practice
Search Engines: Best PracticeSearch Engines: Best Practice
Search Engines: Best PracticeYuliya_Prach
 

Ähnlich wie Modernizing WordPress Search with Elasticsearch (20)

Wordpress search-elasticsearch
Wordpress search-elasticsearchWordpress search-elasticsearch
Wordpress search-elasticsearch
 
PostgreSQL - It's kind've a nifty database
PostgreSQL - It's kind've a nifty databasePostgreSQL - It's kind've a nifty database
PostgreSQL - It's kind've a nifty database
 
Full Text Search In PostgreSQL
Full Text Search In PostgreSQLFull Text Search In PostgreSQL
Full Text Search In PostgreSQL
 
Technologies for Websites
Technologies for WebsitesTechnologies for Websites
Technologies for Websites
 
Victoria wordpress
Victoria wordpressVictoria wordpress
Victoria wordpress
 
Technical Utilities for your Site
Technical Utilities for your SiteTechnical Utilities for your Site
Technical Utilities for your Site
 
Advanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAdvanced full text searching techniques using Lucene
Advanced full text searching techniques using Lucene
 
Full Text Search with Lucene
Full Text Search with LuceneFull Text Search with Lucene
Full Text Search with Lucene
 
Getting started with Laravel & Elasticsearch
Getting started with Laravel & ElasticsearchGetting started with Laravel & Elasticsearch
Getting started with Laravel & Elasticsearch
 
Episerver and search engines
Episerver and search enginesEpiserver and search engines
Episerver and search engines
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화
 
Elastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraElastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case Evira
 
[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화
 
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
 
WEB-MODULE 4.pdf
WEB-MODULE 4.pdfWEB-MODULE 4.pdf
WEB-MODULE 4.pdf
 
AWS October Webinar Series - Introducing Amazon Elasticsearch Service
AWS October Webinar Series - Introducing Amazon Elasticsearch ServiceAWS October Webinar Series - Introducing Amazon Elasticsearch Service
AWS October Webinar Series - Introducing Amazon Elasticsearch Service
 
Examiness hints and tips from the trenches
Examiness hints and tips from the trenchesExaminess hints and tips from the trenches
Examiness hints and tips from the trenches
 
An Introduction to Elastic Search.
An Introduction to Elastic Search.An Introduction to Elastic Search.
An Introduction to Elastic Search.
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMInfinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGM
 
Search Engines: Best Practice
Search Engines: Best PracticeSearch Engines: Best Practice
Search Engines: Best Practice
 

Kürzlich hochgeladen

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Modernizing WordPress Search with Elasticsearch

  • 2. Who Am I? • My name is Taylor Lovett • Director of Web Engineering at 10up • Open source community member • WordPress core contributor • ElasticPress team member @tlovett12
  • 4. WordPress Search is Rudimentary • Only searches post title, content, and excerpt. • Relies on MySQL and thus is slow. • Relevancy calculations are poor and overly simplistic. • Not able to handle any advanced filtering.
  • 6. WordPress Complex Queries Are Slow • Querying for posts that contain multiple meta keys. • Querying for posts that contain multiple taxonomies.
  • 8. Elasticsearch • Open-source search server written in Java based on a technology called Lucene (open- source search software by Apache). • A standalone database server that provides a RESTful interface to accept and store data in a way that is optimized for search and multi- dimensional queries. • Extremely scalable, performant, and reliable
  • 9. Elasticsearch • Relevant results • Performant aggregation queries • Autosuggest • Fuzzy matching • Geographic searches and queries • Filterable searches and queries • Data weighting • Much more
  • 10. Get an Elasticsearch Server • Very flexible and customizable. There is not really a “one size fits all” setup. Generally, you have two options: • Option 1: Pay someone else to manage/host your Elasticsearch cluster (SaaS) • Option 2: Host your own cluster
  • 11. Elasticsearch SaaS • elasticpress.io • qbox.io • heroku.com • elastic.co
  • 13. ElasticPress ElasticPress is a fast and flexible search and query engine for WordPress.
  • 14. ElasticPress Features • Instantly find the content you’re looking for. The first time. Advanced relevancy algorithm which includes date weighting, term/meta searching, fuzzy matching, and more. • Search and query across multiple blogs in a multisite instance. • Extremely performant related content widget.
  • 15. ElasticPress Features • Dramatically improve performance of admin queries to assist editors in finding content. • Indexes text inside of popular file types (pdf, ppt, doc, etc), and adds those files types to search results. • Autosuggest for search - suggest relevant content as text is entered into the search field. • WooCommerce integration that improves faceting and product look up speed as well as order search in the admin.
  • 16. ElasticPress Requirements • WordPress 3.7+ • An instance of Elasticsearch.
  • 17. Installation • Github: http://github.com/10up/elasticpress • WordPress.org: http://wordpress.org/plugins/ elasticpress
  • 22. Query Integration new WP_Query( array(
 ’s’ => ‘search terms’,
 ‘author_name’ => ‘taylor’,
 …
 ) ); new WP_Query( array(
 ’ep_integrate’ => ‘true’,
 ‘author_name’ => ‘taylor’,
 …
 ) ); new WP_Query( array(
 ‘author_name’ => ‘taylor’,
 …
 ) );
  • 23. Advanced Query API • Search taxonomy terms • Filter by taxonomy terms (unlimited dimensions) • Search post meta • Filter by post meta (unlimited dimensions) • Search authors • Filter by authors • Search across blogs in multisite • Complex date filtering • more!
  • 24. Example Queries new WP_Query( array(
 ’s’ => ‘vienna austria’,
 ‘sites’ => ‘all’,
 ) );
  • 25. Example Queries new WP_Query( array(
 ’s’ => ‘vienna austria’,
 ‘search_fields’ => array(
 ‘post_title’,
 ‘post_content’,
 ‘taxonomies’ => array( ‘category’ ),
 ),
 ) );
  • 26. Example Queries new WP_Query( array(
 ’s’ => ‘vienna austria’,
 ‘post_type’ => ‘page’,
 ‘author_name’ => ‘taylor’,
 ‘search_fields’ => array(
 ‘post_title’,
 ‘post_content’,
 ‘meta’ => array( ‘city_name’ ),
 ),
 ) );
  • 27. Example Queries new WP_Query( array(
 ’s’ => ‘vienna austria’,
 ‘tax_query’ => array(
 array(
 ‘taxonomy’ => ‘category’,
 ‘terms’ => array( ‘term1’, ‘term2’ ),
 ),
 ),
 ‘search_fields’ => array(
 ‘post_title’,
 ‘post_content’,
 ‘meta’ => array( ‘city_name’ ),
 ‘author_name’,
 ),
 ‘site’ => 3,
 ) );
  • 28. Example Queries new WP_Query( array(
 ‘ep_integrate’ => true,
 ‘tax_query’ => array(
 array(
 ‘taxonomy’ => ‘category’,
 ‘terms’ => array( ‘term1’, ‘term2’ ),
 ‘operator’ => ‘or’,
 ),
 array(
 ‘taxonomy’ => ‘custom_tax’,
 ‘terms’ => array( ‘customterm1’ ),
 ),
 array(
 ‘taxonomy’ => ‘post_tag’,
 ‘terms’ => array( ‘tag1’ ),
 ),
 ‘relation’ => ‘OR’,
 ),
 ) );
  • 29. Example Queries new WP_Query( array(
 ‘ep_integrate’ => true,
 ‘meta_query’ => array(
 array(
 ‘key’ => ‘city_name’,
 ‘value’ => ‘vienna’,
 ),
 array(
 ‘key’ => ‘number_key’,
 ‘value’ => 5,
 ‘compare’ => ‘>’,
 ),
 array(
 ‘key’ => ‘exists_key’,
 ‘compare’ => ‘exists’,
 ),
 ),
 ) );
  • 30. WP_Query Integration • We want to be able to run all (slower) WP_Query instances through Elasticsearch. • This means we have to support every query parameter which isn’t the case yet. Github contains a full list of parameters WP_Query supports with ElasticPress and usage for each parameter.
  • 31. ElasticPress in Your Language • ElasticPress is designed to be internationalized. • Out of the box, it will work fine with most languages.
  • 32. Analysis and Analyzers • When a document is indexed in Elasticsearch, text is analyzed, broken into terms (tokenized), and normalized with token filters. • In normalization, strings might be lowercased and plurals stripped.
  • 33. Custom Analyzers • ElasticPress by default uses a pretty standard set of analyzers intended for the English language. • We can easily customize our analyzers for use with other languages by filtering ep_config_mapping (see EP source code). • You can read about language specific analyzers here:
 
 http://www.elasticsearch.org/guide/en/elasticsearch/ reference/current/analysis-lang-analyzer.html
  • 34. Documentation Full documentation with installation instructions:
 
 https://github.com/10up/ElasticPress
  • 35. Feedback and Continuing Development • If you are using ElasticPress on a project, please let us know and give us feedback. • Pull requests are welcome!
  • 36. Questions? We need to send a PUT request to this endpoint with our post data. Of course we must authenticate before doing this. @tlovett12 taylor.lovett@10up.com http://elasticpress.io