PHPackages                             xi/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. [Search &amp; Filtering](/categories/search)
4. /
5. xi/search-bundle

ActiveSymfony-bundle[Search &amp; Filtering](/categories/search)

xi/search-bundle
================

Xi Search Bundle provides you frontend logic for elasticsearch

2.2.x-dev(12y ago)35141[1 PRs](https://github.com/xi-project/xi-bundle-search/pulls)1PHP

Since Aug 27Pushed 10y agoCompare

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

READMEChangelogDependencies (7)Versions (5)Used By (1)

Search form &amp; result renderer for Symfony2
==============================================

[](#search-form--result-renderer-for-symfony2)

XiSearchBundle provides simple way to display your search data when you do not know exactly what kind of data to expect.

You can use XiSearchBundle with any searchengine as XiSearchBundle provides you interfaces that your final search data object structure must implement.

Installing
----------

[](#installing)

### deps -file

[](#deps--file)

```
[XiSearchBundle]
    git=http://github.com/xi-project/xi-bundle-search.git
    target=/bundles/Xi/Bundle/SearchBundle

```

### autoload.php file

[](#autoloadphp-file)

```

```

### appKernel.php -file

[](#appkernelphp--file)

```

```

### routing.yml -file

[](#routingyml--file)

```
XiSearchBundle:
    resource: "@XiSearchBundle/Resources/config/routing.yml"
    prefix:   /
```

### config.yml -file

[](#configyml--file)

```
xi_search:
    result_renderer_extensions:
        acmeType: acmeType_renderer_extension
    default_limit: 50
```

### extend ajaxForm (from ajaxbundle) and make sure you bind your custom class as your ajax form handler (see ajaxbundle documentation)

[](#extend-ajaxform-from-ajaxbundle-and-make-sure-you-bind-your-custom-class-as-your-ajax-form-handler-see-ajaxbundle-documentation)

```
class App.AjaxForm.YourCustomClass extends App.AjaxForm.Default

    xiSearchResultCallback: (content) ->
        @searchResult =  $(@element).siblings('.search-result')
        if !@searchResult.length
            $(@element).after('')
            @searchResult =  $(@element).siblings('.search-result')

        @searchResult.html(content)
```

Integration to ElasticSearch
----------------------------

[](#integration-to-elasticsearch)

Probably most easiest way to use this bundle is to use it with ElasticSearch because XiSearchBundle provides you premade implementation for it. This however requires [FOQElasticaBundle](https://github.com/Exercise/FOQElasticaBundle) to work.

Pagination
----------

[](#pagination)

Pagination uses knp-pagination bundle, and it's on by default

Suppose the search is retrieved via ajax, there's a jquery plugin included that binds the received pagination's logic to the actual search form with javascript.

As the pagination generally uses the search forms default fields, only the indices need configuration. page, term and submit button values can also be overridden

```
$('#search-result-container').xiSearchPaginate
        indices: ['#xi_searchbundle_searchtype_index_0', '#xi_searchbundle_searchtype_index_1', ...]
```

For these bindings to work, configure the knp pagination to use the proper pagination template

```
knp_paginator:
    page_range: 9                      # default page range used in pagination control
    default_options:
        page_name: page                # page query parameter name
        sort_field_name: sort          # sort field query parameter name
        sort_direction_name: direction # sort direction query parameter name
        distinct: true                 # ensure distinct results, useful when ORM queries are using GROUP BY statements
    template:
        pagination: XiSearchBundle:Pagination:sliding.html.twig     # sliding pagination controls template
        sortable: KnpPaginatorBundle:Pagination:sortable_link.html.twig # sort link template
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.4% 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 ~152 days

Total

3

Last Release

4691d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/426d650acd3c8b669bd59df3b385bd5d09c42a5c5085d86879d1dda17bbca544?d=identicon)[xi-project](/maintainers/xi-project)

---

Top Contributors

[![joonsp](https://avatars.githubusercontent.com/u/455369?v=4)](https://github.com/joonsp "joonsp (29 commits)")[![HenriVesala](https://avatars.githubusercontent.com/u/965788?v=4)](https://github.com/HenriVesala "HenriVesala (11 commits)")[![janimatti](https://avatars.githubusercontent.com/u/1001560?v=4)](https://github.com/janimatti "janimatti (3 commits)")

---

Tags

searchelasticsearchelasticelastica

### Embed Badge

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

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

###  Alternatives

[elasticsearch/elasticsearch

PHP Client for Elasticsearch

5.3k178.3M937](/packages/elasticsearch-elasticsearch)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[jolicode/elastically

Opinionated Elastica based framework to bootstrap PHP and Elasticsearch implementations.

2571.7M1](/packages/jolicode-elastically)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[cmsig/seal-symfony-bundle

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

15195.8k5](/packages/cmsig-seal-symfony-bundle)[kunstmaan/search-bundle

The KunstmaanSearchBundle works with ElasticSearch and supports different search providers. The bundle currently supports Elastica as a provider. Add your own objects to index using a tagged service which implements the SearchConfigurationInterface

1884.8k1](/packages/kunstmaan-search-bundle)

PHPackages © 2026

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