Enrich Processor: Match Longest

We are enriching documents via Ingest pipeline. It looks like the enrichment processor is only able to enrich by exact match. But what I need is that it enriches incoming documents by longest match. Lets assume I'm enriching incoming documents by domain name and add the field "account" of the source index in case of a match.

My source Index looks like this:

example.com has account name "test"
subdomain.example.com has account "test1"

In theory the "domain" field could include endless subdomains, in my case I want the enrich processor to match the longest one. So that:

this.is.just.a.test.subdomain.example.com is matched/enriched with account "test1" but example.com is matched with account "test". Any ideas how I can solve this?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.