PHPackages                             stexaz/ongr-elasticsearch-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. stexaz/ongr-elasticsearch-bundle

Abandoned → [ongr/elasticsearch-bundle](/?search=ongr%2Felasticsearch-bundle)Symfony-bundle

stexaz/ongr-elasticsearch-bundle
================================

Elasticsearch bundle for Symfony.

v5.0.5(8y ago)01.3kMITPHPPHP &gt;=5.6

Since Oct 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/andriuspetrauskis/ElasticsearchBundle)[ Packagist](https://packagist.org/packages/stexaz/ongr-elasticsearch-bundle)[ Docs](http://ongr.io)[ RSS](/packages/stexaz-ongr-elasticsearch-bundle/feed)WikiDiscussions master Synced today

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

ONGR Elasticsearch Bundle
=========================

[](#ongr-elasticsearch-bundle)

[![Build Status](https://camo.githubusercontent.com/f0f8a9b596686eedd9f299ef6a0032bc713253953305a2513695e9a95086924f/68747470733a2f2f7472617669732d63692e6f72672f6f6e67722d696f2f456c617374696373656172636842756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ongr-io/ElasticsearchBundle)[![Latest Stable Version](https://camo.githubusercontent.com/ffa6c9dde416e6ed52d0fda608b15875da7ecd41484302a03f78b9edb5bc39c8/68747470733a2f2f706f7365722e707567782e6f72672f6f6e67722f656c61737469637365617263682d62756e646c652f762f737461626c65)](https://packagist.org/packages/ongr/elasticsearch-bundle)[![codecov](https://camo.githubusercontent.com/a881d1204db263222c168d0552ceaf5f5eaaef07dd0da27ea06b25b262798c38/68747470733a2f2f636f6465636f762e696f2f67682f6f6e67722d696f2f456c617374696373656172636842756e646c652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/ongr-io/ElasticsearchBundle)[![Total Downloads](https://camo.githubusercontent.com/c34ccd57a73430c2aedb4057765ae947d3483169a28a2b01628630f87c0d3666/68747470733a2f2f706f7365722e707567782e6f72672f6f6e67722f656c61737469637365617263682d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/ongr/elasticsearch-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1e1d808f0c3aae0eb4b47ccd827a1a98684105413ef6f5d208537bed39ec1fd4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6e67722d696f2f456c617374696373656172636842756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ongr-io/ElasticsearchBundle/?branch=master)

Elasticsearch Bundle was created in order to serve the need for professional [Elasticsearch](https://www.elastic.co/products/elasticsearch) integration with enterprise level Symfony applications. This bundle is:

- Uses the official [elasticsearch-php](https://github.com/elastic/elasticsearch-php) client.
- Ensures full integration with Symfony framework and Symfony Flex.

Technical goodies:

- Provides a DSL query builder which represent all ElasticSearch endpoints in the objective way.
- Provides interactive Document object generator via CLI command (`ongr:es:document:generate`)
- Creates a familiar Doctrine-like way to work with documents(entities) document-object mapping using annotations.
- Several query results iterators are provided for your convenience to work with results.
- Console CLI commands for the index management and data import/export/reindex.
- Profiler that integrates in the Symfony debug bar and shows all executed queries.
- Designed in an extensible way for all your custom needs.
- Supports Symfony FLEX.

If you need any help, [stack overflow](http://stackoverflow.com/questions/tagged/ongr) is the preferred way to get answers. is the preferred and recommended way to ask questions about ONGR bundles and libraries.

If you like this library, help me to develop it by buying a cup of coffee

[![Buy Me A Coffee](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/zIKBXRc)

Version matrix
--------------

[](#version-matrix)

Elasticsearch versionElasticsearchBundle version&gt;= 7.0~7.x&gt;= 6.0, &lt; 7.0~6.x&gt;= 5.0, &lt; 5.0~5.x, ~6.x (indexes with 1 type)&gt;= 2.0, &lt; 5.0&gt;=1.0, &lt; 5.0&gt;= 1.0, &lt; 2.0&gt;= 0.10, &lt; 1.0&lt;= 0.90.x&lt; 0.10Documentation
-------------

[](#documentation)

The online documentation of the bundle can be found in [http://docs.ongr.io](http://docs.ongr.io/ElasticsearchBundle). Docs source is stored within the repo under `Resources/doc/`, so if you see a typo or some inaccuracy, please submit a PR or at least an issue to fix it!

*For contribution to the documentation you can find it in the [contribute](http://docs.ongr.io/common/Contributing) topic.*

FAQ
---

[](#faq)

- [Index mapping](http://docs.ongr.io/ElasticsearchBundle/mapping)
- [Configuration](http://docs.ongr.io/ElasticsearchBundle/configuration)
- [Console commands](http://docs.ongr.io/ElasticsearchBundle/commands)
- [How to do simple CRUD actions](http://docs.ongr.io/ElasticsearchBundle/crud)
- [Quick find functions](http://docs.ongr.io/ElasticsearchBundle/find_functions)
- [How to execute search in the index](http://docs.ongr.io/ElasticsearchBundle/search)
- [Parsing the results](http://docs.ongr.io/ElasticsearchBundle/results_parsing)

Setup the bundle
----------------

[](#setup-the-bundle)

#### Step 1: Install Elasticsearch bundle

[](#step-1-install-elasticsearch-bundle)

Elasticsearch bundle is installed using [Composer](https://getcomposer.org).

```
php composer.phar require ongr/elasticsearch-bundle "~6.0"
```

> Instructions for installing and deploying Elasticsearch can be found in [Elasticsearch installation page](https://www.elastic.co/downloads/elasticsearch).

Enable ElasticSearch bundle in your AppKernel:

```
