PHPackages                             helsingborg-stad/algolia-index - 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. [API Development](/categories/api)
4. /
5. helsingborg-stad/algolia-index

ActiveWordpress-plugin[API Development](/categories/api)

helsingborg-stad/algolia-index
==============================

Index wordpress site content to algolia.

3.5.10(5mo ago)018.8k↓45.4%1[1 issues](https://github.com/helsingborg-stad/algolia-index/issues)[1 PRs](https://github.com/helsingborg-stad/algolia-index/pulls)MITPHPCI passing

Since Apr 29Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/helsingborg-stad/algolia-index)[ Packagist](https://packagist.org/packages/helsingborg-stad/algolia-index)[ RSS](/packages/helsingborg-stad-algolia-index/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (5)Versions (94)Used By (0)

Algolia Index
=============

[](#algolia-index)

Manages algolia index (with ms-support and mixed indexes). This is intended to be used by delvelopers. This plugin provide the following set of features:

- Replaces algolia search on the front-end with algolia.
- Index all public searchable posts on post update or creation.
- WpCLI jobs to bulk index all posts on the site.
- Support mixed indices (multiple wordpress sites in the same index).
- Large record splitting (content field).
- Implements "needs update" check before querying algolia, to save costly updates. The functionality is not implemented on split records.

Installation
------------

[](#installation)

1. Install with: "composer require helsingborg-stad/algolia-index"
2. Run composer install inside the plugin.
3. Add required definitions of constants.
4. Run wp-cli job "wp algolia-index build"

Constants
---------

[](#constants)

- define('ALGOLIAINDEX\_APPLICATION\_ID', 'ALGOLIAAPPID'); - REQUIRED
- define('ALGOLIAINDEX\_API\_KEY', 'ALGOLIAAPIKEY'); - REQUIRED
- define('ALGOLIAINDEX\_INDEX\_NAME', 'INDEX'); - OPTIONAL
- define('ALGOLIAINDEX\_PUBLIC\_API\_KEY', 'INDEX'); - OPTIONAL, Required by js searchpage addon

Filters
-------

[](#filters)

- AlgoliaIndex/ShouldIndex: Add more rules to the should index function (removal not possible).
- AlgoliaIndex/Record: What data to send to algolia.
- AlgoliaIndex/Compare: What fields to compare to determine if a post has been updated.
- AlgoliaIndex/SearchableAttributes: What attriubutes in record to be searchable.
- AlgoliaIndex/GeneratedIndexName: Filter for the autogenerated index name.
- AlgoliaIndex/RecordToLarge: Turn off record to large repoting by returning false. To disable record splitting. Only compatbile with business plans, not reccommended!.
- AlgoliaIndex/IndexablePostTypes: What posttypes to index.
- AlgoliaIndex/HitsPerPage: Number of hits per page.
- AlgoliaIndex/AttributesToSnippet: What attributes to snippet.
- AlgoliaIndex/SnippetEllipsisText: Suffix for snippet.
- AlgoliaIndex/BackendSearchActive: Send false to disable backend search.
- AlgoliaIndex/IndexablePostStatuses: What post statuses to allow for index.
- AlgoliaIndex/Provider/Factory: What search database providers are avalible - provider name as key and lambda returning an AbstractProvider as value.

Actions
-------

[](#actions)

- AlgoliaIndex/IndexPostId: Trigger reindex on a post id.
- AlgoliaIndex/SendSettings: Send settings.

WP CLI
------

[](#wp-cli)

- wp algolia-index build: Index all pages/posts on site.

### WP CLI Arguments

[](#wp-cli-arguments)

- To clear index\* before build, add flag --clearindex=true.
- To send required search configuration before build, add flag --settings=true.
- To index using a different search provider (then the active one), add flag --provider={provider-name} (eg. algolia)

### Example

[](#example)

wp site list --field=url --public=1 --archived=0 --deleted=0 --allow-root | xargs -n1 -I % wp algolia-index build --settings=true --url=% --allow-root

- This action is not fully compatible with multiple sites in one shared index! Sites that share the same index will be cleared but not reindexed.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance72

Regular maintenance activity

Popularity26

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity72

Established project with proven stability

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

Recently: every ~17 days

Total

69

Last Release

157d ago

Major Versions

1.9.4 → 2.0.02023-09-14

2.0.0 → 3.0.22023-09-26

### Community

Maintainers

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

---

Top Contributors

[![sebastianthulin](https://avatars.githubusercontent.com/u/797129?v=4)](https://github.com/sebastianthulin "sebastianthulin (18 commits)")[![NiclasNorin](https://avatars.githubusercontent.com/u/103985736?v=4)](https://github.com/NiclasNorin "NiclasNorin (12 commits)")[![Sven65](https://avatars.githubusercontent.com/u/10225982?v=4)](https://github.com/Sven65 "Sven65 (10 commits)")[![thorbrink](https://avatars.githubusercontent.com/u/1064724?v=4)](https://github.com/thorbrink "thorbrink (8 commits)")[![ergr1001](https://avatars.githubusercontent.com/u/97021637?v=4)](https://github.com/ergr1001 "ergr1001 (4 commits)")[![petter-a](https://avatars.githubusercontent.com/u/40427478?v=4)](https://github.com/petter-a "petter-a (3 commits)")[![nRamstedt](https://avatars.githubusercontent.com/u/16800993?v=4)](https://github.com/nRamstedt "nRamstedt (1 commits)")[![jeanfredrik](https://avatars.githubusercontent.com/u/8242740?v=4)](https://github.com/jeanfredrik "jeanfredrik (1 commits)")

---

Tags

getmunicipio

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/helsingborg-stad-algolia-index/health.svg)

```
[![Health](https://phpackages.com/badges/helsingborg-stad-algolia-index/health.svg)](https://phpackages.com/packages/helsingborg-stad-algolia-index)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[algolia/algoliasearch-magento-2

Algolia Search &amp; Discovery extension for Magento 2

1881.9M19](/packages/algolia-algoliasearch-magento-2)[algolia/search-bundle

Algolia Search integration for Symfony

1941.6M2](/packages/algolia-search-bundle)

PHPackages © 2026

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