PHPackages                             coldtrick/opensearch - 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. coldtrick/opensearch

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

coldtrick/opensearch
====================

An OpenSearch implementation for Elgg

v10.0.2(1w ago)11.1kGPL-2.0-onlyPHPCI passing

Since Apr 5Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/ColdTrick/opensearch)[ Packagist](https://packagist.org/packages/coldtrick/opensearch)[ Docs](https://www.coldtrick.com)[ Fund](https://www.paypal.me/ColdTrick)[ GitHub Sponsors](https://github.com/ColdTrick)[ RSS](/packages/coldtrick-opensearch/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (28)Used By (0)

OpenSearch
==========

[](#opensearch)

[![Elgg 6.2](https://camo.githubusercontent.com/cc3511b746e5c462f36ed225cfe4b73b4311b1da56428e101e83460a97c98b41/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d362e322d677265656e2e737667)](https://camo.githubusercontent.com/cc3511b746e5c462f36ed225cfe4b73b4311b1da56428e101e83460a97c98b41/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d362e322d677265656e2e737667)[![Elgg 7.0](https://camo.githubusercontent.com/423f166548449e860ac4466d88666ed84d332bb93d5b6b9caa8c8a75806ad841/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d372e302d677265656e2e737667)](https://camo.githubusercontent.com/423f166548449e860ac4466d88666ed84d332bb93d5b6b9caa8c8a75806ad841/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d372e302d677265656e2e737667)[![OpenSearch 2.5](https://camo.githubusercontent.com/7d8f4d1c3b7dd9d2a38bd9f72a5e19eba2b33881cb64d4816606c2a8d239c1b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e5365617263682d322e352d677265656e2e737667)](https://camo.githubusercontent.com/7d8f4d1c3b7dd9d2a38bd9f72a5e19eba2b33881cb64d4816606c2a8d239c1b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e5365617263682d322e352d677265656e2e737667)[![Lint Checks](https://github.com/ColdTrick/opensearch/actions/workflows/lint.yml/badge.svg?event=push)](https://github.com/ColdTrick/opensearch/actions/workflows/lint.yml/badge.svg?event=push)[![Latest Stable Version](https://camo.githubusercontent.com/96b01d8126341b6c2cce8cd3d8c993e70a279a240c3f745113a6fed2f8f4b551/68747470733a2f2f706f7365722e707567782e6f72672f636f6c64747269636b2f6f70656e7365617263682f762f737461626c652e737667)](https://packagist.org/packages/coldtrick/opensearch)[![License](https://camo.githubusercontent.com/47fdbaa3a28e650027e8762c7a35a14807f7f7668ec9ab230c5007a8dfe59ae1/68747470733a2f2f706f7365722e707567782e6f72672f636f6c64747269636b2f6f70656e7365617263682f6c6963656e73652e737667)](https://packagist.org/packages/coldtrick/opensearch)

An OpenSearch implementation for Elgg

Requirements
------------

[](#requirements)

A working [OpenSearch](https://www.opensearch.org/) server is required. Also the minute cron has to be working on your Elgg installation. The minute cron is used to update the index with all the required changes (create/update/delete).

The current supported version of OpenSearch is: 2.5.x

Configuration
-------------

[](#configuration)

### Settings

[](#settings)

The plugin settings allow you to configure the following:

- Hosts: 1 or more hosts need to be configured (full URL + optional port number). You can provide more hosts comma seperated.
- Index: Name of the index used for indexing Elgg data and search queries
- Search alias (optional): Name of the alias to use in search queries, this allows for easy searching across multiple indices

### Index Management

[](#index-management)

The index management page (found under Administer -&gt; OpenSearch -&gt; Indices in the admin sidebar) allows you to perform various actions on all the indexes available on the OpenSearch server. The following actions are supported:

- Create: This action can only be performed if the index configured in the plugin settings page is not yet available. It will create the default index configuration to be used for search.
- Alias: Add/remove the configured alias to the index (this allows searching across multiple indices)
- Delete: This will remove the index from the server (this action can not be undone)

Administration
--------------

[](#administration)

### Log files

[](#log-files)

Based on the log level of your Elgg site, there will also be logging of the OpenSearch PHP client library. Logging will appear in the same location as all other Elgg logs.

### Statistics

[](#statistics)

You can find various statistics on the Administer -&gt; OpenSearch -&gt; Statistics page. Elgg statistics report on the amount of entities found in the Elgg database that should be in the index. It also reports on the amount of entities that need to be added/updated/deleted in the index and that are currently waiting on the minute cron to process them.

Also some statistics from the OpenSearch Cluster are shown like the status and the version information.

You can also find statistics for all available indexes on this page.

### CLI commands

[](#cli-commands)

CLI commands are available to be used with the default `elgg-cli` command

#### opensearch:rebuild

[](#opensearchrebuild)

This command will rebuild the current OpenSearch index with new configuration and/or mappings. This only works when there is an active index. Only use this command when a change was made to the index configuration and/or mappings.

#### opensearch:sync

[](#opensearchsync)

This command will synchronize all pending entities to the OpenSearch index. This is especially usefull during the reindexing process of the database because a lot of entities need to be indexed. Using the normal cron task in this case could take a long time.

Recommendations
---------------

[](#recommendations)

Use the [Search Advanced](http://github.com/ColdTrick/search_advanced) plugin to add extra features to search. If both are enabled this plugin provides a menu to sort/order the results.

Developers
----------

[](#developers)

### Plugin events

[](#plugin-events)

#### 'boostable\_types', 'opensearch'

[](#boostable_types-opensearch)

Return an array of type.subtype to be used for configuring boosting in OpenSearch.

In the format:

```
[
	'type.subtype',
]
```

Defaults to the registered searchable type/subtypes for OpenSearch.

#### 'config:index', 'opensearch'

[](#configindex-opensearch)

Return an array with the index configuration to be used by OpenSearch.

#### 'config:mapping', 'opensearch'

[](#configmapping-opensearch)

Return an array with the mapping configuration to be used by OpenSearch.

#### 'export:counters', 'opensearch'

[](#exportcounters-opensearch)

Return an array of counters to be exported to OpenSearch.

In the format:

```
[
	'counter_name' => counter_value
]
```

Params contain:

- `entity`: the `ElggEntity` being exported

#### 'export:metadata\_names', 'opensearch'

[](#exportmetadata_names-opensearch)

Return an array of metadata names to be exported to OpenSearch.

Params contain:

- `entity`: the `ElggEntity` being exported

#### 'export:relationship\_names', 'opensearch'

[](#exportrelationship_names-opensearch)

Return an array of relationship names to be exported to OpenSearch.

Params contain:

- `entity`: the `ElggEntity` being exported

#### 'index\_entity\_type\_subtypes', 'opensearch'

[](#index_entity_type_subtypes-opensearch)

Return an array of type/subtypes allowed to be indexed by OpenSearch.

In the format:

```
[
	'type' => ['subtype1', 'subtype2'],
]
```

Defaults to all registered searchable type/subtypes in Elgg.

#### 'index:entity:prevent', 'opensearch'

[](#indexentityprevent-opensearch)

Return `true` if the provided entity shouldn't be added to the OpenSearch index

Params contain:

- `entity`: the `ElggEntity` about to be indexed

Default: `false`

#### 'index:entity:type', 'opensearch'

[](#indexentitytype-opensearch)

Return a string under which type/subtype the entity should be indexed. This is used for type filtering during the search (eg. all blogs)

Params contain:

- `entity`: the `ElggEntity` about to be indexed
- `default`: the default type/subtype for this entity

Default: `{entity_type}.{entity_subtype}` (eg. `object.blog`)

#### 'params', 'opensearch'

[](#params-opensearch)

Return an array of parameters to be using in initializing the `\ColdTrick\OpenSearch\Client` OpenSearch client.

#### 'search', 'type\_subtype\_pairs'

[](#search-type_subtype_pairs)

Return an array of type/subtypes allowed to be searched by OpenSearch.

In the format:

```
[
	'type' => ['subtype1', 'subtype2'],
]
```

Defaults to all registered searchable type/subtypes in Elgg.

#### 'search\_params', 'opensearch'

[](#search_params-opensearch)

Return an `\ColdTrick\OpenSearch\Di\SearchService` to be used for the search. This allows you to alter the search parameters in opensearch.

Params contain:

- `search_params`: an array of the search parameters as provided by Elgg search

#### 'to:entity:before', 'opensearch'

[](#toentitybefore-opensearch)

Change the OpenSearch hit data before it's converted to an `ElggEntity`

Params contain:

- `hit`: the result from OpenSearch
- `search_params`: an array of the search parameters as provided by Elgg search

#### 'to:entity', 'opensearch'

[](#toentity-opensearch)

Return an `ElggEntity` based on the search result data from OpenSearch.

Params contain:

- `hit`: the result from OpenSearch
- `search_params`: an array of the search parameters as provided by Elgg search

### Parameters passed to `elgg_search`

[](#parameters-passed-to-elgg_search)

#### field\_boosting

[](#field_boosting)

In the parameters passed to `elgg_search` you can add a configuration to control field boosting in OpenSearch. Add the key `field_boosting` to the array which holds an array with field-name and the boosting for that field.

Example:

```
[
	'field_boosting' => [
		'title' => 2, // title is worth double
		'description' => 0.5 // description is worth half
	],
]
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance92

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 77.2% of commits — single point of failure

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 ~68 days

Recently: every ~91 days

Total

24

Last Release

8d ago

Major Versions

v5.0 → v6.02023-11-30

v6.0 → v7.02024-06-28

v7.1.1 → v8.02025-01-23

v8.0.1 → v9.02025-04-16

v9.1.2 → v10.02025-11-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4ac1d6abe137b2a78bd0527b3c1f085be51c6a8f70e2fd81fcd7fac3d8d59bf?d=identicon)[jeabakker](/maintainers/jeabakker)

---

Top Contributors

[![jeabakker](https://avatars.githubusercontent.com/u/881958?v=4)](https://github.com/jeabakker "jeabakker (412 commits)")[![jdalsem](https://avatars.githubusercontent.com/u/861833?v=4)](https://github.com/jdalsem "jdalsem (122 commits)")

---

Tags

pluginsearchopensearchelgglucene

### Embed Badge

![Health badge](/badges/coldtrick-opensearch/health.svg)

```
[![Health](https://phpackages.com/badges/coldtrick-opensearch/health.svg)](https://phpackages.com/packages/coldtrick-opensearch)
```

###  Alternatives

[shopware/elasticsearch

Elasticsearch for Shopware

144.1M21](/packages/shopware-elasticsearch)[zing/laravel-scout-opensearch

Laravel Scout custom engine for OpenSearch

36482.1k](/packages/zing-laravel-scout-opensearch)[cmsig/seal

Search Engine Abstraction Layer

33355.5k176](/packages/cmsig-seal)[cmsig/seal-symfony-bundle

An integration of CMS-IG SEAL search abstraction into Symfony Framework.

15323.1k13](/packages/cmsig-seal-symfony-bundle)[cloudmediasolutions/laravel-scout-opensearch

OpenSearch engine for Laravel Scout

1825.8k](/packages/cloudmediasolutions-laravel-scout-opensearch)[10up/debug-bar-elasticpress

Extends the Debug Bar plugin for usage with ElasticPress

2817.6k](/packages/10up-debug-bar-elasticpress)

PHPackages © 2026

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