Fuzzy search in MODX

Are there any existing MODX 3 Extras, that implement fuzzy search? I’d like to search in Resources and Files (via FileAttach).

Here’s an example:
Search term: manufacture of xxx
Results: 0
Search term: manufacturing of xxx
Results: 5

My assumption is, that each results could get a “score” defined, which would get determined using Levenshtein’s distance or something similar. Then I could the treshold according to my needs.
I can’t find anything in SimpleSearch docs or any similar extras that would work that way.

SimpleSearch only runs a simple LIKE '%...%' SQL query in the database.
There is nothing sophisticated going on with SimpleSearch, no indexing or similar.


For MODX 2, there exists the extra mSearch2 that uses morphological search.
As I understand it, it takes the words and saves their basic form in a new database table. For example “go”, “goes” “going”, “went” etc. are all stored as “go”.
But (as far as I know) there isn’t yet a version for MODX 3 and the morphological analyzer that is used only supports Russian, English and German.


Maybe an external service could be used for a better search.
There exists the extra SSAlgolia, but I have never used it.

There’s also this: GitHub - modmore/elastic: [unsupported] ElasticSearch integration for MODX

It hasn’t been updated in quite a while though. Would probably require some work to get it running.

@dev_willis I don’t even remember what project I once built that for. Anyone that wants to take it over is welcome to do so but it may be easier to start from scratch vs use something that’s 9 years old :jordan:

Custom Search implements regular expressions for both search and replace, so it can do quite sopisticated searches on almost all fields in almost all MODX objects. It does not do morphological or soundex searches, though.

It runs as a CMP in the Manager, but can be used in code to do searches.