WP Manifestindependent plugin directory
manifest / admin / es-admin

ES Admin

ES Admin

★ 12stars
573composer installs
v0.1.0latest · 1 year ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/alleyinteractive/es-admin/archive/refs/heads/main.zip

On Packagist as alleyinteractive/es-admin:

composer require alleyinteractive/es-admin
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Insanely powerful admin search, powered by Elasticsearch.

Description

Adds a powerful faceted search page to the admin area to search all posts across all post types.

Optionally, this plugin can also replace core's post search forms throughout the entire admin area to leverage Elasticsearch for faster, more relevant search results.

Prerequisites

  • Elasticsearch server
  • Elasticsearch plugin/adapter (e.g. SearchPress
  • ES_WP_Query if you want to use the optional core search replacement.

Installation

ES Admin is designed to be able to work with any Elasticsearch index, regardless of how the data is mapped. In order to accomplish this, ES Admin requires you to register an "Adapter", which maps appropriate post fields (e.g. post_content) to the Elasticsearch index path (e.g. post_content.analyzed). ES Admin currently comes with four adapters: SearchPress, WordPress.com (used by WordPress.com VIP sites hosted on the main WordPress.com platform), Jetpack Search (available on VIP Go or as part of Jetpack's Professional Plan), and a generic adapter primarily used for unit testing. You aren't limited to using one of the included adapters, you can very easily build your own to work with your Elasticsearch plugin of choice by extending the ES_Admin\Adapters\Adapter abstract class. See the Generic Adapter as an example to create your own.

Once you have your adapter, you register it with ES Admin using the es_admin_adapter filter. This filter expects a class name in return, which must be an ES_Admin\Adapters\Adapter extension. Here's an example using this filter with the SearchPress adapter:

add_filter( 'es_admin_adapter', function() {
    return '\ES_Admin\Adapters\SearchPress';
} );

In order to use the optional "core search replacement" feature, which will replace any post search form in the admin with an Elasticsearch integration, you must also install and activate ES_WP_Query (see the README on setting up ES_WP_Query). ES_WP_Query must be setup with its own adapter prior to the after_setup_theme action fires at priority 10.

Here's an example setting up ES_WP_Query to use its SearchPress adapter, and doing so at after_setup_theme priority 5 to ensure it fires before ES Admin needs it:

add_action( 'after_setup_theme', function() {
    if ( function_exists( 'es_wp_query_load_adapter' ) ) {
        es_wp_query_load_adapter( 'searchpress' );
    }
}, 5 );

When setup correctly, ES Admin will add a settings page to enable/disable the search integration. Once enabled, all post search forms in the admin will use Elasticsearch to deliver search results.

Releases

1 release.

Tag
Published
v0.1.0 latest
Mar 24, 2025 1 year ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.