elasticsearch regex split into groups 255 characters

First of all, sorry for my English. I have encountered the following issue when performing a query with regular expressions in Elasticsearch.

This index field is a text longer than 255 characters (This is important).

Field search for

When performing the following search, it does not return it as a result, which I found strange.

Regexp Query

So, I performed this other search and while it did return a result, I found it odd how Elasticsearch highlighted it.

Try 2


When I checked the length of the highlighted text, I found it to be 255 characters.

To confirm a theory I had in mind, I performed a third search and it found it.

Try 3

Elasticsearch highlighted this other portion of the entire text.


This led me to develop a theory that when performing the search by regular expression, Elasticsearch was separating the entire text of the field into portions of 255 characters and performing the search within each portion separately.

Perhaps I am stating something that is obvious to you, but I need help finding a solution so that the regular expression performs an integral search across the entire content of the field.

Links aren’t working for me so can’t look into it.

First Image

Second Image

Third Image

Fourth Image

Fifth Image

Sixth Image