I have a (non-published) plugin that I'm using that is capable of using elasticsearch for indexing & search from within Thunderbird. I never bothered publishing it, since I never really wanted to maintain it/build a business out of it. Would this be something you are interested in, potentially for a small fee?
It might not work for me for various reasons, but pay a fee to release the source code in the wild for anyone (me or others) to pick it up, yes why not ! Safer if you put a way to contact you on your profile
Elasticsearch is a pretty bad choice for what really needs to be an embedded database. There are other FTS engines out there of varying quality that would be better suited to this particular case. Off the top of my head, Meillisearch and sqlite3's FTS5 would both be highly embed-able but have other tradeoffs (such as storage overhead).