PHPackages                             flowpack/searchplugin - 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. flowpack/searchplugin

ActiveNeos-package[Search &amp; Filtering](/categories/search)

flowpack/searchplugin
=====================

Plugin for search integration via content node

6.0.1(1y ago)24263.5k↓61.3%31[4 issues](https://github.com/Flowpack/Flowpack.SearchPlugin/issues)1MITPHP

Since Mar 20Pushed 1y ago6 watchersCompare

[ Source](https://github.com/Flowpack/Flowpack.SearchPlugin)[ Packagist](https://packagist.org/packages/flowpack/searchplugin)[ RSS](/packages/flowpack-searchplugin/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (7)Versions (32)Used By (1)

Flowpack.SearchPlugin
=====================

[](#flowpacksearchplugin)

[![Latest Stable Version](https://camo.githubusercontent.com/012dec46ffddf1ea18de3f26b8f30b09f1287a2acea44fa56e2a54c2b1d6db3a/68747470733a2f2f706f7365722e707567782e6f72672f666c6f777061636b2f736561726368706c7567696e2f762f737461626c65)](https://packagist.org/packages/flowpack/searchplugin) [![Total Downloads](https://camo.githubusercontent.com/fd08882c25ede607ffbeed7748e3824d209bca442eeae7cf70df66d269cff1f5/68747470733a2f2f706f7365722e707567782e6f72672f666c6f777061636b2f736561726368706c7567696e2f646f776e6c6f616473)](https://packagist.org/packages/flowpack/searchplugin)

This plugin is a Search Plugin, to be used together with

- [Flowpack.ElasticSearch.ContentRepositoryAdaptor](https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor) or
- [Flowpack.SimpleSearch.ContentRepositoryAdaptor](https://github.com/Flowpack/Flowpack.SimpleSearch.ContentRepositoryAdaptor).

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

[](#installation)

Install via composer with your favorite adaptor:

**ElasticSearch**

```
composer require flowpack/searchplugin flowpack/elasticsearch-contentrepositoryadaptor

```

**SimpleSearch**

```
composer require flowpack/searchplugin flowpack/simplesearch-contentrepositoryadaptor

```

Inclusion of the routes from this package into your main `Configuration/Routes.yaml` is no longer needed as of Flow 4.0.

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

[](#configuration)

### Custom index name

[](#custom-index-name)

It is usually a good idea to specify a custom index name for a project, instead of the default `typo3cr`. That way no conflicts can arise when multiple projects use the same Elasticsearch server.

To specify a custom index name, the following is needed:

```
Neos:
  ContentRepository:
    Search:
      elasticSearch:
        indexName: acmecom

```

### Pagination

[](#pagination)

The pagination search results can be configured via Fusion. The following shows the defaults:

```
prototype(Flowpack.SearchPlugin:Search).configuration {
    itemsPerPage = 25
    insertAbove = false
    insertBelow = true
    maximumNumberOfLinks = 10
}

```

### Custom result rendering

[](#custom-result-rendering)

The result list is rendered using a Fusion object of type `nodeType + 'SearchResult'` for each hit. Thus you can easily adjust the rendering per type like this for an imaginary `Acme.AcmeCom:Product` nodetype:

```
prototype(Acme.AcmeCom:ProductSearchResult) < prototype(Neos.Neos:DocumentSearchResult) {
    templatePath = 'resource://Acme.AcmeCom/Private/Templates/SearchResult/ProductSearchResult.html'
}

```

Feel free to use the `DocumentSearchResult.html` in the Flowpack.SearchPlugin as an example.

Search completions and suggestions
----------------------------------

[](#search-completions-and-suggestions)

The default search form template comes with a `data-autocomplete-source` attribute pointing to the `SuggestController` of this package.

To use this term suggester, you need to configure the indexing like this, to define a custom analyzer to be used:

```
Flowpack:
  ElasticSearch:
    indexes:
      default:      # client name used to connect (see Flowpack.ElasticSearch.clients)
        acmecom:    # your (custom) index name
          settings:
            analysis:
              filter:
                autocompleteFilter:
                  max_shingle_size: 5
                  min_shingle_size: 2
                  type: 'shingle'
              analyzer:
                autocomplete:
                  filter: [ 'lowercase', 'autocompleteFilter' ]
                  char_filter: [ 'html_strip' ]
                  type: 'custom'
                  tokenizer: 'standard'

```

Then you need to configure the node types to be be included in the suggestion building, this can be done like this:

```
'Neos.Neos:Document':
  superTypes:
    'Flowpack.SearchPlugin:SuggestableMixin': true
    'Flowpack.SearchPlugin:AutocompletableMixin': true

'Neos.Neos:Shortcut':
  superTypes:
    'Flowpack.SearchPlugin:SuggestableMixin': false
    'Flowpack.SearchPlugin:AutocompletableMixin': false

'Neos.NodeTypes:TitleMixin':
  superTypes:
    'Flowpack.SearchPlugin:SuggestableMixin': true
    'Flowpack.SearchPlugin:AutocompletableMixin': true

```

When fed with a `term` parameter via a `GET` request, the `SuggestController` will return a JSON-encoded array of suggestions from Elasticsearch. They are fetched with a term suggester from the `_all` field, i.e. "the fulltext index".

These can be used to provide autocompletion on the search input using a JS library of your choice. In case you need to build the URI to the suggest controller yourself, this is what the form uses:

```
{f:uri.action(action: 'index', controller: 'Suggest', package: 'Flowpack.SearchPlugin', format: 'json', absolute: 1, arguments: {contextNodeIdentifier: node.identifier, dimensionCombination: dimensionCombination})}

```

### Adjust the suggestion context

[](#adjust-the-suggestion-context)

The suggestionContext determines, if a result should be displayed in suggetions. By default, nodes that are hidden are excluded. In many projects, the search als takes the Neos.Seo metaRobotsNoindex property into account or excludes certain nodeTypes. In order to adjust the suggestion context to your search logic, you can write your custom logic and switch the implementation of the `Flowpack\SearchPlugin\Suggestion\SuggestionContextInterface` via Objects.yaml

### Create URIs for suggestions

[](#create-uris-for-suggestions)

To create valid links for suggestions the following package can be used:

- [Punktde.OutOfBandRendering](https://github.com/punktDe/outofbandrendering)

Connect the given example of this package with a custom fusion object:

```
pathToProtoType = Your.Vendor:Content.NodeLink

```

And finally add the new property to the plugin settings:

```
Flowpack:
  SearchPlugin:
    searchAsYouType:
      suggestions:
        sourceFields:
          - title
          - __myProperty

```

AJAX search
-----------

[](#ajax-search)

The plugin comes with a controller that can be reached like this per default, using `GET`:

```
{f:uri.action(action: 'search', controller: 'AjaxSearch', package: 'Flowpack.SearchPlugin', arguments: {node: node, q: ''}, absolute: 1)}

```

It expects the search term as a parameter named `q` (as defined in `AjaxSearch.fusion`). This controller renders the search results and returns them as HTML without any of the page template. It can therefore be used to request search results via AJAX and display the result by adding it to the DOM as needed.

Removing special chars from search term
---------------------------------------

[](#removing-special-chars-from-search-term)

It is recommended to remove characters, which are reserved in Elasticsearch from the search term to prevent errors. There is an eel helper to replace them before submitting the search like this:

```
prototype(Flowpack.SearchPlugin:Search) {
    searchTerm = ${Flowpack.SearchPlugin.SearchTerm.sanitize(request.arguments.search)}
}

```

Keep in mind, that this blocks the explicit use of wildcards (`*`) and phrase search (`"search exactly this"`) for your users, in case you want to support that.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance44

Moderate activity, may be stable

Popularity46

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity74

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

Recently: every ~275 days

Total

29

Last Release

431d ago

Major Versions

3.1.1 → 4.0.02018-06-25

4.1.0 → 5.0.02020-05-31

4.0.x-dev → 5.1.02020-12-20

5.3.3 → 6.0.02025-04-02

5.3.x-dev → 6.0.12025-04-04

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/25d49a6af82b72d2764774a05c307808375016d7aeaaef3862472a6580ff38a7?d=identicon)[flowpack](/maintainers/flowpack)

---

Top Contributors

[![daniellienert](https://avatars.githubusercontent.com/u/642226?v=4)](https://github.com/daniellienert "daniellienert (72 commits)")[![gerhard-boden](https://avatars.githubusercontent.com/u/10533739?v=4)](https://github.com/gerhard-boden "gerhard-boden (37 commits)")[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (30 commits)")[![skurfuerst](https://avatars.githubusercontent.com/u/190777?v=4)](https://github.com/skurfuerst "skurfuerst (17 commits)")[![dfeyer](https://avatars.githubusercontent.com/u/221173?v=4)](https://github.com/dfeyer "dfeyer (11 commits)")[![ComiR](https://avatars.githubusercontent.com/u/11410095?v=4)](https://github.com/ComiR "ComiR (10 commits)")[![dlubitz](https://avatars.githubusercontent.com/u/13046100?v=4)](https://github.com/dlubitz "dlubitz (5 commits)")[![aertmann](https://avatars.githubusercontent.com/u/903567?v=4)](https://github.com/aertmann "aertmann (5 commits)")[![Sebobo](https://avatars.githubusercontent.com/u/596967?v=4)](https://github.com/Sebobo "Sebobo (5 commits)")[![mficzel](https://avatars.githubusercontent.com/u/1309380?v=4)](https://github.com/mficzel "mficzel (3 commits)")[![soee](https://avatars.githubusercontent.com/u/1798417?v=4)](https://github.com/soee "soee (2 commits)")[![johannessteu](https://avatars.githubusercontent.com/u/769789?v=4)](https://github.com/johannessteu "johannessteu (2 commits)")[![MattiasNilsson](https://avatars.githubusercontent.com/u/1718315?v=4)](https://github.com/MattiasNilsson "MattiasNilsson (1 commits)")[![MaxFaessler](https://avatars.githubusercontent.com/u/45080955?v=4)](https://github.com/MaxFaessler "MaxFaessler (1 commits)")[![markusguenther](https://avatars.githubusercontent.com/u/1014126?v=4)](https://github.com/markusguenther "markusguenther (1 commits)")[![mgrundkoetter](https://avatars.githubusercontent.com/u/1526725?v=4)](https://github.com/mgrundkoetter "mgrundkoetter (1 commits)")[![peterbucher](https://avatars.githubusercontent.com/u/1229021?v=4)](https://github.com/peterbucher "peterbucher (1 commits)")[![langeland](https://avatars.githubusercontent.com/u/726403?v=4)](https://github.com/langeland "langeland (1 commits)")[![jrenggli](https://avatars.githubusercontent.com/u/743094?v=4)](https://github.com/jrenggli "jrenggli (1 commits)")[![darmstaedter](https://avatars.githubusercontent.com/u/873002?v=4)](https://github.com/darmstaedter "darmstaedter (1 commits)")

---

Tags

elasticsearchhacktoberfestneoscms

### Embed Badge

![Health badge](/badges/flowpack-searchplugin/health.svg)

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

###  Alternatives

[neos/neos

An open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users.

1131.0M734](/packages/neos-neos)[flowpack/elasticsearch-contentrepositoryadaptor

This package provides functionality for using Elasticsearch on top of Neos.ContentRepository.Search

42394.3k9](/packages/flowpack-elasticsearch-contentrepositoryadaptor)[flowpack/simplesearch-contentrepositoryadaptor

Implements a bridge to search in Neos CR via the flowpack/simplesearch package.

2331.7k](/packages/flowpack-simplesearch-contentrepositoryadaptor)[medienreaktor/meilisearch

Integrates Meilisearch into Neos.

101.0k](/packages/medienreaktor-meilisearch)[neos/content-repository-search

Common code and interface for a Neos CR search implementation

10424.4k7](/packages/neos-content-repository-search)[flowpack/elasticsearch

This package provides wrapper functionality for the Elasticsearch engine.

34498.2k5](/packages/flowpack-elasticsearch)

PHPackages © 2026

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