Where the length limitation comes from or is set up?

Hi,

Getting this message:

ERROR [Messages] Failed to index [1] messages. Please check the index error log in your web interface for the reason. Error: failure in bulk execution:
[7]: index [graylog_58], type [message], id [0ee956f1-f94d-11e6-a259-080027c05c11], message [java.lang.IllegalArgumentException: Document contains at least one immense term in field="msg" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped.  Please correct the analyzer to not produce such terms.  The prefix of the first immense term 

Where the limitation 32766 comes from?

Thanks,
Eugene

Wow, no idea where all of these are coming from today, but please refer to these topics: