https://github.com/metamodels/attribute_levenshtein
Levenshtein-based search
https://github.com/metamodels/attribute_levenshtein
Last synced: 4 months ago
JSON representation
Levenshtein-based search
- Host: GitHub
- URL: https://github.com/metamodels/attribute_levenshtein
- Owner: MetaModels
- License: lgpl-3.0
- Created: 2022-11-14T13:12:20.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-22T17:27:31.000Z (11 months ago)
- Last Synced: 2025-09-12T18:21:14.228Z (5 months ago)
- Language: PHP
- Homepage:
- Size: 289 KB
- Stars: 0
- Watchers: 9
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/MetaModels/attribute_levenshtein/actions)
[](https://github.com/MetaModels/attribute_levenshtein/tags)
[](https://packagist.org/packages/MetaModels/attribute_levenshtein)
[](https://packagist.org/packages/MetaModels/attribute_levenshtein)
Levenshtein-based search
========================
The levenshtein attribute maintains an index of keywords across other attributes which can be searched using the
levenshtein algorithm.
There is a filter rule that enables a similarity search via the created index. Optionally, an auto-completion
("Vanilla Script") can be activated (please note the template selection).
Adjustment of the index table
-----------------------------
The fields for storing the index can be enlarged as required e.g. from a length of `64` to `256`.
To do this, create a corresponding DCA file and adjust the values. (Note: the keys and the file name still
have the old, wrong notation with "sth").
```php
// contao/dca/tl_metamodel_levensthein_index.php
$GLOBALS['TL_DCA']['tl_metamodel_levensthein_index']['fields']['transliterated']['sql'] =
'varbinary(256) NOT NULL default \'\'';
$GLOBALS['TL_DCA']['tl_metamodel_levensthein_index']['fields']['word']['sql'] =
'varchar(256) BINARY NOT NULL default \'\'';
```