Skip to main content

Posts

Showing posts from October, 2026

nlsearch: teaching Elasticsearch what your codes mean

I asked my own plugin for the most expensive piece of clothing in an inventory index, and it gave me a backpack. The index had a field called dept with three values: FW , AP and EQ . To you and me that is footwear, apparel and equipment. To a language model reading a mapping, it is three pairs of letters. Nothing in the mapping says AP means apparel, so the model guessed, picked the wrong code, and wrote a confident sentence about the result. The worst part is that a wrong guess looks exactly like a right one from the outside. You get documents, you get an answer, and nothing tells you the question was misread. Fixing that changed how nlsearch works more than anything else I have done to it. This post walks through what the plugin does, how a request moves through it, how it learns what an index means, and what is still rough. What nlsearch is nlsearch is an Elasticsearch plugin I build on weekends. It adds one endpoint, _nl . You send it a sentence, it asks a language mod...