DS Index Provider: Lucene
An index storage extension for OpenDXP Dynamic Search. Store data with the PHP Lucene index service.
⚠️ Important - EOL announcement
This extension has reached its end of life and won't be migrated for PHP 9. Support for PHP 8.x will be continued until the latest PHP 8.x version reached its end of life (as of now, 31.12.2029)
Release Plan
| Release | Supported OpenDXP Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---|---|---|---|---|---|
| 1.x | 1.0 | ^7.4 | 04.02.2026 | Feature Branch | 1.x |
Installation
"require" : {
"open-dxp/dynamic-search-bundle" : "~1.0.0",
"open-dxp/dynamic-search-index-provider-lucene-bundle" : "~1.0.0"
}
Dependencies
This package will also install a fork of ZendSearch to provide the latest PHP compatibility.
Dynamic Search Bundle
You need to install / enable the Dynamic Search Bundle first. Read more about it here. After that, proceed as followed:
Add Bundle to bundles.php:
<?php
return [
\OpenDxp\Bundle\DsLuceneBundle\OpenDxpDsLuceneBundle::class => ['all' => true],
];
Basic Setup
opendxp_dynamic_search:
context:
default:
index_provider:
service: 'lucene'
options:
database_name: 'my_lucene_storage'
Provider Options
| Name | Default Value | Description |
|---|---|---|
database_name | null | |
force_adding_document | true | |
analyzer | [] |
Index Fields
Available Index Fields:
| Name | Description |
|---|---|
binary | Binary fields are not tokenized or indexed, but are stored for retrieval with search hits. They can be used to store any data encoded as a binary string, such as an image icon. |
keyword | Keyword fields are stored and indexed, meaning that they can be searched as well as displayed in search results. They are not split up into separate words by tokenization. |
text | Text fields are stored, indexed, and tokenized. Text fields are appropriate for storing information like subjects and titles that need to be searchable as well as returned with search results. |
unIndexed | UnIndexed fields are not searchable, but they are returned with search hits. Database timestamps, primary keys, file system paths, and other external identifiers are good candidates for UnIndexed fields. |
unStored | UnStored fields are tokenized and indexed, but not stored in the index. Large amounts of text are best indexed using this type of field. Storing data creates a larger index on disk, so if you need to search but not redisplay the data, use an UnStored field. |
Output Channel Services
Autocomplete
Identifier: lucene_autocomplete
Available Options:
| Name | Default Value | Description |
|---|---|---|
min_prefix_length | 3 | |
use_fuzzy_term_search_fallback | true | |
fuzzy_default_prefix_length | ||
fuzzy_similarity | 0.5 |
Suggestions
Identifier: lucene_suggestions
Available Options:
| Name | Default Value | Description |
|---|---|---|
min_prefix_length | 3 | |
result_limit | 10 | |
only_last_word_wildcard | false | |
multiple_words_operator | 'OR' | |
restrict_search_fields | [] | |
restrict_search_fields_operator | 'OR' |
Search
Identifier: lucene_search
Available Options:
| Name | Default Value | Description |
|---|---|---|
min_prefix_length | 3 | |
max_per_page | 10 |
Multi Search
Identifier: lucene_multi_search
Available Options: none
Filter
RelationsFilter
Identifier: relations
Available Options:
| Name | Default Value | Allowed Type | Description |
|---|---|---|---|
identifier | null | string | |
value | null | string | |
label | null | string, null | |
show_in_frontend | true | bool | |
relation_label | null | closure, null |
Output Normalizer
A Output Normalizer can be defined for each output channel.
lucene_document_key_value_normalizer
Available Options:
| Name | Default Value | Description |
|---|---|---|
skip_fields | [] |
Further Information
- Lucene Configuration
- Custom Analyzer (Example: Syllable Analyzer)
- Lucene Token Filter (Stemming Filter, Stop Words Filter)
- Debugging (Debugging Lucene Index Database)
Upgrade Info
Before updating, please check the changelog!
Coming from an earlier package? Read Migrating to OpenDXP.
License
Licensed under the GNU General Public License v3.0 (GPLv3). For details, please see LICENSE.md.
Copyright
© 2026 OpenDXP — GPLv3