Skip to content

A fast and flexible search and query engine for WordPress.

Notifications You must be signed in to change notification settings

dustinrue/ElasticPress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElasticPress Build Status

Integrate Elasticsearch with WordPress.

Purpose

Let's face it, WordPress search is rudimentary at best. Poor performance, inflexible and rigid matching algorithms (which means no comprehension of 'close' queries), the inability to search metadata and taxonomy information, no way to determine categories of your results and most importantly the overall relevancy of results is poor.

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.

Coupling WordPress with Elasticsearch allows us to do amazing things with search including:

  • Relevant results
  • Autosuggest
  • Fuzzy matching (catch misspellings as well as 'close' queries)
  • Proximity and geographic queries
  • Search metadata
  • Search taxonomies
  • Facets
  • Search all sites on a multisite install
  • The list goes on...

Installation

  1. First, you will need to properly install and configure Elasticsearch.
  2. Install the plugin in WordPress, you can download a zip via Github and upload it using the WP plugin uploader.

Configuration

First, make sure you have Elasticsearch configured properly.

Before configuring the WordPress plugin, you need to decide how you want to run the plugin. The processes for configuring single site and multisite cross-site search are slightly different.

Single Site

  1. Activate the plugin.
  2. Within the admin panel, navigate to Settings -> ElasticPress
  3. Input the Elasticsearch host, Elasticsearch index name, and at least one post type you want to index.

Multisite Cross-site Search

  1. Network activate the plugin
  2. Within your network settings dashboard, go to Settings -> ElasticPress
  3. Check the box to activate cross-site search
  4. Input the Elasticsearch host, Elasticsearch index name, and at least one post type on one site that you want to index.

Development

Setup

Follow the configuration instructions above to setup the plugin.

Testing

Within the terminal change directories to the plugin folder. Initialize your testing environment by running the following command:

For VVV users:

bash bin/install-wp-tests.sh wordpress_test root root localhost latest

For VIP Quickstart users:

bash bin/install-wp-tests.sh wordpress_test root '' localhost latest

where:

  • wordpress_test is the name of the test database (all data will be deleted!)
  • root is the MySQL user name
  • root is the MySQL user password (if you're running VVV). Blank if you're running VIP Quickstart.
  • localhost is the MySQL server host
  • latest is the WordPress version; could also be 3.7, 3.6.2 etc.

Run the plugin tests:

phpunit

Issues

If you identify any errors or have an idea for improving the plugin, please open an issue. We're excited to see what the community thinks of this project, and we would love your input!

About

A fast and flexible search and query engine for WordPress.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 91.3%
  • JavaScript 5.8%
  • CSS 2.9%