PHPackages                             algolia/algolia-search-bundle - 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. algolia/algolia-search-bundle

Abandoned → [algolia/search-bundle](/?search=algolia%2Fsearch-bundle)Symfony-bundle[API Development](/categories/api)

algolia/algolia-search-bundle
=============================

Algolia Search integration for Symfony

8.0.0(1mo ago)192299.2k↓36.8%73[10 issues](https://github.com/algolia/search-bundle/issues)[8 PRs](https://github.com/algolia/search-bundle/pulls)2MITPHPPHP &gt;= 8.2CI passing

Since Jan 12Pushed 1mo ago78 watchersCompare

[ Source](https://github.com/algolia/search-bundle)[ Packagist](https://packagist.org/packages/algolia/algolia-search-bundle)[ RSS](/packages/algolia-algolia-search-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (32)Versions (66)Used By (2)

 [ ![Algolia for Symfony](https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/symfony.png) ](https://www.algolia.com)

####  The perfect starting point to integrate [Algolia](https://algolia.com) within your Symfony project

[](#--the-perfect-starting-point-to-integrate---algolia---within-your-symfony-project--)

 [![CI](https://github.com/algolia/search-bundle/actions/workflows/ci.yml/badge.svg)](https://github.com/algolia/search-bundle/actions/workflows/ci.yml) [![Total Downloads](https://camo.githubusercontent.com/b8557bd0d1bfabe9dec86b9be7ff32b37919bac6f70c84b471237aa43eed8504/68747470733a2f2f706f7365722e707567782e6f72672f616c676f6c69612f7365617263682d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/algolia/search-bundle) [![Latest Version](https://camo.githubusercontent.com/a43ca6aba24a876d2a72b419f5cc65407a8bd0aca94227c26d8829cdadb5da74/68747470733a2f2f706f7365722e707567782e6f72672f616c676f6c69612f7365617263682d62756e646c652f762f737461626c65)](https://packagist.org/packages/algolia/search-bundle) [![License](https://camo.githubusercontent.com/985a5208f4c4aa5b6ffa05bcc04c9a03a9197a7e78d141a1735c54cf7532d17f/68747470733a2f2f706f7365722e707567782e6f72672f616c676f6c69612f7365617263682d62756e646c652f6c6963656e7365)](https://packagist.org/packages/algolia/search-bundle)

 [Documentation](https://www.algolia.com/doc/framework-integration/symfony/getting-started) • [PHP](https://github.com/algolia/algoliasearch-client-php) • [Laravel](https://github.com/algolia/scout-extended) • [Community Forum](https://discourse.algolia.com) • [Stack Overflow](http://stackoverflow.com/questions/tagged/algolia) • [Report a bug](https://github.com/algolia/search-bundle/issues) • [FAQ](https://www.algolia.com/doc/framework-integration/symfony/troubleshooting/faq/) • [Support](https://www.algolia.com/support)

✨ Features
----------

[](#-features)

- **Simple**: You can get started with only 5 lines of YAML
- **Robust**: It benefits from all the features of our PHP Client v3, like the [`wait()`](/doc/api-reference/api-methods/wait-task/) method
- **Flexible**: All methods take optional `$requestOptions` to let you handle your data as you wish
- **Dev-friendly**: Auto-completion and type-hinting thanks to an exhaustive documentation

Algolia SearchBundle requires PHP &gt;= 8.2 and supports Symfony 7 and 8.

💡 Getting Started
-----------------

[](#-getting-started)

First, install Algolia Search Bundle Integration via the composer package manager:

```
composer require algolia/search-bundle
```

You will also need to provide the Algolia App ID and Admin API key. By default, they are loaded from environment variables `ALGOLIA_APP_ID` and `ALGOLIA_API_KEY`.

If you use `.env` config file, you can set them there.

```
ALGOLIA_APP_ID=XXXXXXXXXX
ALGOLIA_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

If you don't use environment variables, you can set them in your `parameters.yml`.

```
parameters:
    env(ALGOLIA_APP_ID): XXXXXXXXXX
    env(ALGOLIA_API_KEY): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

Indexing data
-------------

[](#indexing-data)

First, we need to define which entities should be indexed in Algolia. Each entry under the `indices` config key must contain at least the 2 following attributes:

- `name` is the canonical name of the index in Algolia
- `class` is the full name of the entity to index

Example:

```
algolia_search:
  indices:
    - name: posts
      class: App\Entity\Post
```

### Via CLI

[](#via-cli)

Once your `indices` config is ready, you can use the built-in console command to batch import all existing data.

```
# Import all indices
php bin/console search:import

# Choose what indices to reindex by passing the index name
php bin/console search:import --indices=posts,comments
```

Before re-indexing everything, you may want to clear the index first, see [how to remove data](https://www.algolia.com/doc/framework-integration/symfony/indexing/?language=php#removing-manually).

Simple Search
-------------

[](#simple-search)

In this example we'll search for posts. The `search` method will query Algolia to get matching results and then will create a doctrine collection. The data are pulled from the database (that's why you need to pass the Doctrine Manager).

```
$posts = $this->searchService->search($entityManager, Post::class, 'query');
```

For full documentation, visit the **[Algolia Symfony Search Bundle](https://www.algolia.com/doc/framework-integration/symfony/getting-started/)**.

Troubleshooting
---------------

[](#troubleshooting)

Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/framework-integration/symfony/troubleshooting/faq/) where you will find answers for the most common issues and gotchas with the bundle.

Use the Dockerfile
------------------

[](#use-the-dockerfile)

If you want to contribute to this project without installing all its dependencies, you can use our Docker image. Please check our [dedicated guide](DOCKER_README.MD) to learn more.

📄 License
---------

[](#-license)

Algolia Symfony Search Bundle is an open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity52

Moderate usage in the ecosystem

Community41

Growing community involvement

Maturity90

Battle-tested with a long release history

 Bus Factor3

3 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 ~77 days

Recently: every ~379 days

Total

54

Last Release

55d ago

Major Versions

4.1.2 → 5.0.02021-03-18

5.1.2 → 6.0.02022-01-28

5.2.1 → 6.0.12023-04-13

6.0.1 → 7.0.02024-07-15

7.0.0 → 8.0.02026-03-25

PHP version history (4 changes)2.0.0PHP ^5.6 || ^7.0

5.0.0PHP ^7.2 || ^8.0

6.0.0PHP &gt;= 8.0.2

7.0.0PHP &gt;= 8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/86cfef5c1f5195df1a9db17a5f8ecb34455e1f0133a725de9acf7f2fb26ac6a1?d=identicon)[nunomaduro](/maintainers/nunomaduro)

![](https://www.gravatar.com/avatar/2d7edc00d7586a052392de7e25358c0e37b80631002efd3863432ff4fb61a033?d=identicon)[speedblue](/maintainers/speedblue)

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

![](https://www.gravatar.com/avatar/41b2c9ca6c01f18e470d2b1978227f8538e7af7031b8b05235aed5f6e186c2f1?d=identicon)[RayRutjes](/maintainers/RayRutjes)

---

Top Contributors

[![julienbourdeau](https://avatars.githubusercontent.com/u/1525636?v=4)](https://github.com/julienbourdeau "julienbourdeau (226 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (73 commits)")[![chloelbn](https://avatars.githubusercontent.com/u/2184068?v=4)](https://github.com/chloelbn "chloelbn (63 commits)")[![djfm](https://avatars.githubusercontent.com/u/1460499?v=4)](https://github.com/djfm "djfm (56 commits)")[![alcaeus](https://avatars.githubusercontent.com/u/383198?v=4)](https://github.com/alcaeus "alcaeus (38 commits)")[![maxiloc](https://avatars.githubusercontent.com/u/1689007?v=4)](https://github.com/maxiloc "maxiloc (37 commits)")[![eric-zaharia](https://avatars.githubusercontent.com/u/94015633?v=4)](https://github.com/eric-zaharia "eric-zaharia (26 commits)")[![algoliareadmebot](https://avatars.githubusercontent.com/u/18572634?v=4)](https://github.com/algoliareadmebot "algoliareadmebot (22 commits)")[![tristanbes](https://avatars.githubusercontent.com/u/346010?v=4)](https://github.com/tristanbes "tristanbes (20 commits)")[![redox](https://avatars.githubusercontent.com/u/29529?v=4)](https://github.com/redox "redox (15 commits)")[![DevinCodes](https://avatars.githubusercontent.com/u/46448173?v=4)](https://github.com/DevinCodes "DevinCodes (13 commits)")[![rayrutjes](https://avatars.githubusercontent.com/u/5570853?v=4)](https://github.com/rayrutjes "rayrutjes (7 commits)")[![gregquat](https://avatars.githubusercontent.com/u/293127?v=4)](https://github.com/gregquat "gregquat (5 commits)")[![matts2cant](https://avatars.githubusercontent.com/u/1333408?v=4)](https://github.com/matts2cant "matts2cant (5 commits)")[![cjean-fr](https://avatars.githubusercontent.com/u/87385?v=4)](https://github.com/cjean-fr "cjean-fr (2 commits)")[![brunonic](https://avatars.githubusercontent.com/u/1011840?v=4)](https://github.com/brunonic "brunonic (2 commits)")[![ostrolucky](https://avatars.githubusercontent.com/u/496233?v=4)](https://github.com/ostrolucky "ostrolucky (2 commits)")[![mpclarkson](https://avatars.githubusercontent.com/u/4843821?v=4)](https://github.com/mpclarkson "mpclarkson (2 commits)")[![ogizanagi](https://avatars.githubusercontent.com/u/2211145?v=4)](https://github.com/ogizanagi "ogizanagi (2 commits)")[![mchahed99](https://avatars.githubusercontent.com/u/34678981?v=4)](https://github.com/mchahed99 "mchahed99 (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/algolia-algolia-search-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/algolia-algolia-search-bundle/health.svg)](https://phpackages.com/packages/algolia-algolia-search-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[algolia/search-bundle

Algolia Search integration for Symfony

1931.5M2](/packages/algolia-search-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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