PHPackages                             heimrichhannot/contao-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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. heimrichhannot/contao-search-bundle

ActiveContao-bundle[PDF &amp; Document Generation](/categories/documents)

heimrichhannot/contao-search-bundle
===================================

This bundle contains enhancements for Contao Search.

3.0.2(1y ago)11.4k↓50%3[1 PRs](https://github.com/heimrichhannot/contao-search-bundle/pulls)LGPL-3.0-or-laterPHPPHP ^8.1

Since Nov 6Pushed 11mo ago6 watchersCompare

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

READMEChangelog (10)Dependencies (12)Versions (30)Used By (0)

Contao Search Bundle
====================

[](#contao-search-bundle)

[![](https://camo.githubusercontent.com/42cc31aa8623907f161fb5b16b5d37a358fa94e9c56fd52d72c649fc39ed4ffb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6865696d7269636868616e6e6f742f636f6e74616f2d7365617263682d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-search-bundle)[![](https://camo.githubusercontent.com/0991268fb134cd4c0b48964d7a3ec07753bfe23ed1c613a91f7fdf2b67dd88a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6865696d7269636868616e6e6f742f636f6e74616f2d7365617263682d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-search-bundle)

This bundle contains enhancements for Contao Search. You can enable or disable all functionality to pick up just the features you need.

Features
--------

[](#features)

- pdf search
- set maximum number of search terms
- Page filter for search module
- Related search content element
- log search terms

Usage
-----

[](#usage)

### Install

[](#install)

1. Install composer bundle: `composer require heimrichhannot/contao-search-bundle`
2. Optional: Install guzze HTTP client: `composer require guzzlehttp/guzzle` (needed for rebuild search index command)
3. Optional: Install Smalot PdfParser: `"smalot/pdfparser": "^2.3"` (needed for pdf search, minimum supported version is 0.18.2)
4. Enable/Disable features you want in your project config (see chapter configuration) and clear your cache
5. Update your database

### Maximum number of search terms

[](#maximum-number-of-search-terms)

1. Be sure `huh_search.disable_max_keyword_filter` is set to false (is false by default)
2. Set maximum number of keywords to a value higher than 0 to enable

    [![Search engine module max keyword input](docs/images/screenshot_max_keywords.png)](docs/images/screenshot_max_keywords.png)
3. If you want to output a user notice if the max keyword count is exceeded, select `mod_search_searchbundle` module template or output `$this->maxKeywordsExceededMessage` template variable where you like.
4. If you need to support a language with special letters like german umlauts, you can pass additional chars to the `huh_search.valid_word_chars` option to get a correct word count. By default, the german umlauts and eszett are preconfigured. Keep in mind, that you override the default value by setting this option (so you need to add them in your config if you want to support them).

Example:

```
// mod_search.html5

     ()

```

1. If you want to customize the message, overwrite the translations keys for `huh_search.module.max_keywords_exceeded_message` (Symfony translations used). `%count%` (number of provided keywords) and `%max%` (max allowed number of keywords) are provided as placeholder values.

### Filter your search results by page

[](#filter-your-search-results-by-page)

1. Enable `huh_search.enable_search_filter` in your config (enabled by default)
2. Create or edit your search engine module and setup the search filter section as you like

    [![Search engine module filter section](docs/images/screenshot_page_filter_module.png)](docs/images/screenshot_page_filter_module.png)

### Related search content element

[](#related-search-content-element)

This element is basically the content hyperlink element (also uses the same templates) but with the twist, that it keeps the search parameters. It's designed for use together with news filter to link to another search module with a different filter config.

1. Create a Related search link content element on a page with an search module
2. Set another page with a search module as target

### Search keyword log

[](#search-keyword-log)

To log search keywords, just set `huh_search.enable_search_log` to true. Afterwards you'll find `huh_search_log`-files withing your log folder containing a csv-formatted list of datetime and keyword. Maximum 7 days are stored (you can alter this period by customizing the monolog settings for huh\_search\_log channel).

### Pdf search

[](#pdf-search)

To enable pdf indexing for contao search, following steps are needed:

1. Set `huh_search.pdf_indexer.enabled` to true

    ```
    # config/config.yml (Contao 4.9) or app/Resources/config.yml (Contao 4.4)
    huh_search:
      pdf_indexer:
        enabled: true
    ```
2. Add `"smalot/pdfparser": "^0.18"` as composer dependency
3. Rebuild search index

For more configuration options for the pdf indexer see the configuration reference.

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

[](#configuration)

Complete configuration reference

```
# Default configuration for extension with alias: "huh_search"
huh_search:

   # Configure the pdf indexer.
   pdf_indexer:

      # Enable pdf indexing for search.
      enabled:              false

      # Max characters to process and store from a pdf file. 0 means no limit.
      max_indexed_characters: 2000

      # Maximum file size of a pdf that can be processed by the pdf parser to prevent memory overflow or process timeout. Specify in KiB. 0 means no limit. 1024KiB = 1MB.
      max_file_size:        8096

   # Enable or disable search filter for search module
   enable_search_filter: true

   # Enable or disable max keyword filter for search module
   disable_max_keyword_filter: false

   # Enable a search keyword logging.
   enable_search_log:    false

   # Set additional chars that should be not break a word (used for charlist parameter of str_word_count function).
   valid_word_chars:     ÄäÖöÜüẞß
```

Acknowledgments
---------------

[](#acknowledgments)

The pdf search integration was sponsored by [fanthomas communications](https://fanthomas-communications.de/).

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance50

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 98% 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 ~70 days

Recently: every ~123 days

Total

29

Last Release

409d ago

Major Versions

1.1.2 → 2.0.02020-02-17

v2.x-dev → 3.0.02024-02-20

PHP version history (4 changes)1.0.0PHP ^7.1

2.8.0PHP ^7.4 || ^8.0

3.0.0PHP ^8.0

3.0.2PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/28ad3224d8727b622ebd229840eea6b9dbcb83eb0bd609e6ce65b614830ff538?d=identicon)[digitales@heimrich-hannot.de](/maintainers/digitales@heimrich-hannot.de)

---

Top Contributors

[![koertho](https://avatars.githubusercontent.com/u/12064642?v=4)](https://github.com/koertho "koertho (50 commits)")[![c4y](https://avatars.githubusercontent.com/u/808164?v=4)](https://github.com/c4y "c4y (1 commits)")

---

Tags

contaopdfsearchsearchpdfcontao

###  Code Quality

Static AnalysisRector

Code StyleECS

### Embed Badge

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

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)

PHPackages © 2026

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