What should I do if I need special analyzer in ElasticSearch?

In my textual data, I have structures like this:

ст. ст. 40, 131, 132, 176-178, 183, ч. 2 ст. 187, 188, 184, 189, 194 KK

Where KK is the name of a codex, ст. ст., or ст. mean article, ч. mean part. I want Elasticsearch to find a similar string using a regular expression and execute a script to process this string so that I can get tokens like these

40 KK, 131 KK, ..... 194 KK.

How can I get it in Elasticsearch?

It seems like a specific entity extraction aka NER. I think it should be done in upstream (out of ES).

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