PHPackages                             alleyinteractive/elasticsearch-extensions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. alleyinteractive/elasticsearch-extensions

ActiveWordpress-plugin[Search &amp; Filtering](/categories/search)

alleyinteractive/elasticsearch-extensions
=========================================

A WordPress plugin to make integrating sites with Elasticsearch easier.

v0.2.1(4mo ago)5228.4k↑15.6%[15 issues](https://github.com/alleyinteractive/elasticsearch-extensions/issues)[2 PRs](https://github.com/alleyinteractive/elasticsearch-extensions/pulls)GPL-3.0-or-laterPHPPHP ^8.3CI passing

Since Sep 15Pushed 3mo ago20 watchersCompare

[ Source](https://github.com/alleyinteractive/elasticsearch-extensions)[ Packagist](https://packagist.org/packages/alleyinteractive/elasticsearch-extensions)[ RSS](/packages/alleyinteractive-elasticsearch-extensions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (11)Used By (0)

Elasticsearch Extensions
========================

[](#elasticsearch-extensions)

[![Project Status: Active.](https://camo.githubusercontent.com/39c688bf243eeb6d3bfc529dcf3cb27443613deb696c8fa9f49bccf1e63e3bef/68747470733a2f2f7777772e7265706f7374617475732e6f72672f6261646765732f6c61746573742f6163746976652e737667)](https://www.repostatus.org/#active)

A WordPress plugin to make integrating sites with [Elasticsearch](https://www.elastic.co/webinars/getting-started-elasticsearch)easier:

- Seamlessly and automatically integrates with different Elasticsearch plugins.
- Simplifies common Elasticsearch operations like adding aggregations and filtering indexable post types, taxonomies, and postmeta in an implementation-agnostic way.

Background
----------

[](#background)

In most projects that need to integrate with an Elasticsearch provider, there is a lot of common code—configuring the post types to index and search, taxonomies, postmeta, and setting up front-end and back-end logic for handling aggregations (often referred to as faceted search). This plugin aims to provide a unified interface for the most common configuration options for Elasticsearch integrations on WordPress sites to reduce the amount of custom code or boilerplate that developers need to write on every project. Likewise, it aims to centralize updates so if something changes in an Elasticsearch plugin, the update likely only needs to be made to this plugin, which can in turn be updated on the sites that depend on it.

This plugin is a work in progress. It currently supports the following adapters:

- [VIP Enterprise Search](https://docs.wpvip.com/technical-references/enterprise-search/)
- [SearchPress](https://github.com/alleyinteractive/searchpress)

With future support planned for the following adapters:

- [ElasticPress](https://www.elasticpress.io/)

Test coverage is also a work in progress, but the goal is to have test coverage for all functionality for all adapters which also tests different versions of Elasticsearch (as is necessary and practical) using GitHub Actions.

Releases
--------

[](#releases)

All work on this plugin should be based off of `main` and pull requests should be made into `main`. Once sufficient work has been done to justify making a new release, it should be created using GitHub Releases, tagged, and described. Releases must follow semantic versioning. During the active development phase, releases should start with a `0` and we can move to a `1.0.0` once we have full test coverage and full support for all target adapters.

For a list of all releases, please see the [releases page](https://github.com/alleyinteractive/elasticsearch-extensions/releases).

### Install

[](#install)

In order to use this plugin, you must install it alongside a supported Elasticsearch plugin:

- [VIP Enterprise Search](https://docs.wpvip.com/technical-references/enterprise-search/)
- [SearchPress](https://github.com/alleyinteractive/searchpress)

### Use

[](#use)

Install and activate the plugin to have it interface with an existing installed Elasticsearch plugin. This plugin will automatically detect which supported Elasticsearch plugin is in use, and will register the appropriate hooks.

Customize the Elasticsearch integration using the `elasticsearch_extensions_config` action. Method calls can be chained for ease of configuration. For example:

```
add_action(
	'elasticsearch_extensions_config',
	 function( $es_config ) {
		$es_config
			->restrict_post_statuses( [ 'publish', 'my-custom-status' ] )
			->restrict_post_types( [ 'post', 'page' ] )
			->enable_empty_search()
			->enable_post_type_aggregation()
			->enable_taxonomy_aggregation( 'category' )
			->enable_taxonomy_aggregation( 'post_tag' );
	 }
);
```

For detailed information on all configuration options, action and filter hooks, and how to integrate aggregation controls into the search template, see [the wiki](https://github.com/alleyinteractive/elasticsearch-extensions/wiki).

### From Source

[](#from-source)

In order to install this plugin to develop new features or fix bugs, you should first install a clean WordPress site, then clone this repository into the `plugins` folder:

```
$ cd wp-content/plugins
$ git clone git@github.com:alleyinteractive/elasticsearch-extensions.git
```

If you are using a fork to develop against, substitute the URL of your fork above.

Next, you need to run `composer install` in order to install dependencies, including the adapter plugins:

```
$ cd elasticsearch-extensions
$ composer install
```

This will install all current and planned adapter plugins. Regular WordPress plugins will be installed to `plugins` and VIP Enterprise Search will be installed as part of `vip-go-mu-plugins` in the `mu-plugins` folder.

In order to ensure you are developing against the latest version of these plugins, you may need to run `composer update`. Since there is a custom package configuration, if you haven't done so already, you may need to establish a GitHub access token to read package information via the API. Composer will prompt you if this is the case—follow the instructions it provides.

You will also need to ensure that you are running Elasticsearch in a location where the plugins can access it, and you will need to configure a connection to Elasticsearch for the plugin you are working on (e.g., VIP Enterprise Search).

### Changelog

[](#changelog)

This project keeps a [changelog](CHANGELOG.md).

Development Process
-------------------

[](#development-process)

See instructions above on installing from source. Pull requests are welcome from the community and will be considered for inclusion.

### Contributing

[](#contributing)

See [our contributor guidelines](CONTRIBUTING.md) for instructions on how to contribute to this open source project.

Project Structure
-----------------

[](#project-structure)

This project is built on an adapter pattern to allow for a common API that supports various Elasticsearch plugins. Adapters are extended from a base class and are available in [lib/adapters](lib/adapters).

Aggregations (faceted search) are a major feature of this plugin. Aggregations are defined, similarly to adapters, by extending a base class, and all aggregations are defined in [lib/aggregations](lib/aggregations).

Tests are run via phpunit, verified by GitHub Actions when a pull request is created, and are located in the [tests](tests) folder.

Interaction with Elasticsearch involves writing and modifying Elasticsearch DSL ([Domain-Specific Language](https://en.wikipedia.org/wiki/Domain-specific_language)). There is a [DSL class](lib/class-dsl.php) which should contain all DSL that the plugin needs to write. Specific DSL structures will differ based on which adapter is being used, so the adapters are each responsible for modifying the DSL that is written by the plugin in use in order to establish the same functionality for a developer or user irrespective of their chosen integration.

This plugin uses a [factory pattern](https://en.wikipedia.org/wiki/Factory_(object-oriented_programming))to handle creating a controller that loads an adapter based on which plugin is active.

Controller methods are chainable, following a common practice in Laravel, by returning the current object at the end of a function call. See [the controller class](lib/class-controller.php) to see how this works. This design choice makes it possible to call several configuration methods in a row without having to reference the object again (see the Use section above for an example of how this works in practice).

Third-Party Dependencies
------------------------

[](#third-party-dependencies)

In order to use this plugin, you need to have an Elasticsearch cluster available and a supported Elasticsearch plugin installed and configured to connect to it.

Related Efforts
---------------

[](#related-efforts)

This plugin is part of a collection of [Elasticsearch](https://www.elastic.co/)open source plugins developed and maintained by [Alley](https://alley.com/):

- [SearchPress](https://github.com/alleyinteractive/searchpress)
- [ES\_WP\_Query](https://github.com/alleyinteractive/es-wp-query)
- [ES Admin](https://github.com/alleyinteractive/es-admin)

Maintainers
-----------

[](#maintainers)

- [Alley](https://github.com/alleyinteractive)

[![Alley logo](https://avatars.githubusercontent.com/u/1733454?s=200&v=4)](https://avatars.githubusercontent.com/u/1733454?s=200&v=4)

### Contributors

[](#contributors)

Thanks to all of the [contributors](CONTRIBUTORS.md) to this project.

License
-------

[](#license)

This project is licensed under the [GNU Public License (GPL) version 3](LICENSE) or later.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance60

Regular maintenance activity

Popularity39

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~123 days

Total

3

Last Release

123d ago

PHP version history (2 changes)v0.1.0PHP ^8.1 || ^8.2

v0.2.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/338d27065b1074f2d66d049d742f22996dd137eef6f91bc8f75350ceee1e8ef2?d=identicon)[srtfisher](/maintainers/srtfisher)

---

Top Contributors

[![jakewrfoster](https://avatars.githubusercontent.com/u/1018205?v=4)](https://github.com/jakewrfoster "jakewrfoster (129 commits)")[![kevinfodness](https://avatars.githubusercontent.com/u/2650828?v=4)](https://github.com/kevinfodness "kevinfodness (129 commits)")[![renatonascalves](https://avatars.githubusercontent.com/u/19148962?v=4)](https://github.com/renatonascalves "renatonascalves (74 commits)")[![moraleida](https://avatars.githubusercontent.com/u/1174547?v=4)](https://github.com/moraleida "moraleida (24 commits)")[![dlh01](https://avatars.githubusercontent.com/u/697432?v=4)](https://github.com/dlh01 "dlh01 (20 commits)")[![juliobranha](https://avatars.githubusercontent.com/u/6450969?v=4)](https://github.com/juliobranha "juliobranha (15 commits)")[![mboynes](https://avatars.githubusercontent.com/u/465154?v=4)](https://github.com/mboynes "mboynes (7 commits)")[![tylermachado](https://avatars.githubusercontent.com/u/3586466?v=4)](https://github.com/tylermachado "tylermachado (7 commits)")[![nikkifurls](https://avatars.githubusercontent.com/u/19735805?v=4)](https://github.com/nikkifurls "nikkifurls (4 commits)")[![srtfisher](https://avatars.githubusercontent.com/u/346399?v=4)](https://github.com/srtfisher "srtfisher (2 commits)")

---

Tags

wordpress

### Embed Badge

![Health badge](/badges/alleyinteractive-elasticsearch-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/alleyinteractive-elasticsearch-extensions/health.svg)](https://phpackages.com/packages/alleyinteractive-elasticsearch-extensions)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
