PHPackages                             leuchtdiode/opendxp-fulltext-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. leuchtdiode/opendxp-fulltext-search-bundle

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

leuchtdiode/opendxp-fulltext-search-bundle
==========================================

OpenDxp Fulltext Search Bundle

1.3.3(2d ago)023↑291.3%MITPHP ~8.3.0 || ~8.4.0 || ~8.5.0

Since Jul 5Compare

[ Source](https://github.com/leuchtdiode/opendxp-fulltext-search-bundle)[ Packagist](https://packagist.org/packages/leuchtdiode/opendxp-fulltext-search-bundle)[ RSS](/packages/leuchtdiode-opendxp-fulltext-search-bundle/feed)WikiDiscussions Synced today

READMEChangelogDependencies (6)Versions (11)Used By (0)

OpenDxp Fulltext Search Bundle
==============================

[](#opendxp-fulltext-search-bundle)

Symfony bundle for indexing and searching documents with SQLite FTS5.

What it does
------------

[](#what-it-does)

- Collects documents from services that implement `DocumentProviderInterface`
- Builds a per-collection SQLite database in `OPENDXP_PRIVATE_VAR`
- Searches the indexed `content` field with SQLite full-text search
- Returns structured results with `id`, `url`, `title`, `description`, and optional `payload`

How it works
------------

[](#how-it-works)

1. You create one or more document providers.
2. The bundle indexes all documents for a collection into `fulltext-search--.sqlite`.
3. The searcher queries that database with SQLite FTS5.
4. Results are ranked by `bm25()` and paginated with `limit` and `offset`.

The database is stored at:

```
OPENDXP_PRIVATE_VAR/fulltext-search--.sqlite

```

Requirements
------------

[](#requirements)

- PHP 8.3+
- `ext-pdo`
- SQLite support in PHP
- `open-dxp/opendxp`

Install
-------

[](#install)

```
composer require leuchtdiode/opendxp-fulltext-search-bundle
```

Then register the bundle in your Symfony app if it is not auto-registered:

```
// config/bundles.php
return [
    // ...
    Try2catch\OpenDxp\FulltextSearchBundle\OpenDxpFulltextSearchBundle::class => ['all' => true],
];
```

Create a document provider
--------------------------

[](#create-a-document-provider)

Implement `DocumentProviderInterface` and return an `Iterator` of `FulltextSearchDocument` objects.

```
use ArrayIterator;
use Iterator;
use Try2catch\OpenDxp\FulltextSearchBundle\DocumentProviderInterface;
use Try2catch\OpenDxp\FulltextSearchBundle\Model\FulltextSearchDocument;

final class ArticleDocumentProvider implements DocumentProviderInterface
{
    public function getCollection(): string
    {
        return 'default';
    }

    public function get(): Iterator
    {
        return new ArrayIterator([
            new FulltextSearchDocument(
                id: '123',
                url: '/articles/123',
                title: 'Hello world',
                description: 'Intro article',
                content: 'This is the searchable content',
                payload: json_encode(['category' => 'news']),
            ),
        ]);
    }
}
```

If the service is autoconfigured, the bundle tags it automatically as a document provider.

If you want to register it explicitly in `config/services.yaml`, add the tag yourself:

```
services:
  App\FulltextSearch\ArticleDocumentProvider:
    tags:
      - { name: 'fulltext_search.document_provider' }
```

Index documents
---------------

[](#index-documents)

Use the console command:

```
php bin/console fulltext-search:index --collection=default
```

If `--collection` is omitted, the command uses `default`.

Search documents
----------------

[](#search-documents)

Inject `Try2catch\OpenDxp\FulltextSearchBundle\Searcher` and call `search()` with `SearchParams`.

```
use Try2catch\OpenDxp\FulltextSearchBundle\SearchParams;
use Try2catch\OpenDxp\FulltextSearchBundle\Searcher;

$result = $searcher->search(
    SearchParams::create()
        ->setCollection('default')
        ->setKeyword('hello world')
        ->setLimit(10)
        ->setOffset(0)
);

foreach ($result->getItems() as $item) {
    $item->getId();
    $item->getUrl();
    $item->getTitle();
    $item->getDescription();
    $item->getPayloadDecoded();
}

$total = $result->getTotalCount();
```

Notes
-----

[](#notes)

- Search matches against `content`.
- `title` and `description` are returned, but are not used for matching.
- Payload is stored as a string and can be decoded with `getPayloadDecoded()`.
- Each collection has its own SQLite file.
- Re-indexing replaces the existing database file for that collection.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance99

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Total

9

Last Release

2d ago

Major Versions

0.0.2 → 1.0.02026-07-06

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/leuchtdiode-opendxp-fulltext-search-bundle/health.svg)

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

PHPackages © 2026

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