Name screening has two ways to fail. Miss a real match because the name was spelled differently, and you have a compliance problem. Match too loosely, and analysts drown in false positives until they stop looking closely. Elasticsearch is a good engine for this, provided you treat it as the first of two steps.
Why names are hard
The same person can appear as:
- Jürgen Müller, Juergen Mueller, Jurgen Muller (umlauts written three ways)
- Müller, Jürgen or Mueller J. (order and initials)
- Мюллер Юрген (Cyrillic) or another transliteration of it
- Jürgen Müller-Schmidt (a double surname)
A default text field with the standard analyzer only matches the first form exactly. Typo tolerance (fuzziness) helps with one or two letters, but ue against ü is already two edits, and transliterations are much further apart.
Index each name several ways
Store the name once and analyse it into several sub-fields. Each one catches a different kind of variant.
PUT screening
{
"settings": {
"analysis": {
"filter": {
"dmeta": { "type": "phonetic", "encoder": "double_metaphone", "replace": true },
"tri": { "type": "ngram", "min_gram": 3, "max_gram": 3 }
},
"analyzer": {
"name_fold": { "tokenizer": "standard", "filter": ["lowercase", "german_normalization", "asciifolding"] },
"name_phonetic": { "tokenizer": "standard", "filter": ["lowercase", "asciifolding", "dmeta"] },
"name_tri": { "tokenizer": "standard", "filter": ["lowercase", "asciifolding", "tri"] }
}
}
},
"mappings": {
"properties": {
"name": {
"type": "text",
"analyzer": "name_fold",
"fields": {
"phonetic": { "type": "text", "analyzer": "name_phonetic" },
"tri": { "type": "text", "analyzer": "name_tri" }
}
},
"birth_date": { "type": "date" },
"country": { "type": "keyword" },
"list": { "type": "keyword" }
}
}
}
What each field does:
name:german_normalizationturnsüandueintou, so Müller, Mueller and Muller all index asmuller. Use the normaliser for your main languages; German is the example here.name.phonetic: Double Metaphone codes, so names that sound alike match. This needs theanalysis-phoneticplugin, which is available on Elastic Cloud and installable on self-managed clusters.name.tri: three-letter fragments, which tolerate typos, missing letters and parts of double names.
For lists with Cyrillic, Arabic or Chinese names, add a field that uses the icu_transform filter from the analysis-icu plugin with the Any-Latin; Latin-ASCII transform, so non-Latin names are compared in Latin script.
Query all fields, with different weights
GET screening/_search
{
"size": 25,
"query": {
"bool": {
"should": [
{ "match": { "name": { "query": "juergen mueller", "operator": "and", "boost": 4 } } },
{ "match": { "name": { "query": "juergen mueller", "fuzziness": "AUTO", "operator": "and", "boost": 2 } } },
{ "match": { "name.phonetic": { "query": "juergen mueller", "operator": "and", "boost": 1.5 } } },
{ "match": { "name.tri": { "query": "juergen mueller", "minimum_should_match": "60%" } } }
],
"minimum_should_match": 1
}
}
}
An exact match after folding scores highest, a phonetic or partial match lower. match ignores word order, so "Mueller Juergen" finds the same records.
Use a second step for the decision
Elasticsearch scores are relative: they depend on the query, the index and term statistics. A score of 12 means nothing on its own, so do not use one fixed min_score as your screening threshold.
Use Elasticsearch for recall: return the top 25 candidates fast, even from millions of list entries. Then score those candidates in your application with measures that compliance can explain:
- Name similarity, for example Jaro-Winkler on the folded names, per name part.
- Agreement on date of birth, nationality or country of residence.
- Initials: "J." is compatible with Jürgen, but weak evidence.
- The list and the type of entry.
The result is a number between 0 and 1 with a reason for each part. Your compliance team sets the threshold, and every alert shows why it fired. That is far easier to defend in an audit than "the search engine said so".
Measure before you tune
Build a test set from past alerts: true matches, false positives your analysts closed, and known variants you want to catch. Then measure:
- Recall: share of known true matches found in the top 25 candidates. This should be close to 100%.
- False positives per 1,000 screenings at your chosen threshold.
- Alerts per analyst per day: the number the business cares about.
Change one thing at a time (a boost, a filter, the threshold), rerun the test set and keep what improves both numbers.
Running it in a regulated environment
Screening data is sensitive, and so are the logs of who was screened. Keep the cluster inside your environment, restrict who can query the screening index, and turn on audit logging; see Elasticsearch audit logging for DORA and ISO 27001. We build and tune screening search for banks and fintechs on anonymised test data, without needing your customer records: see Elasticsearch for fintech.
