The length of text to be analyzed for highlighting [18031] exceeded the allowed maximum of [10000] set for the next major Elastic version. For large texts, indexing with offsets or term vectors is recommended!

[2018-04-17T15:00:25,855][WARN ][d.o.a.l.s.u.CustomUnifiedHighlighter] The length of text to be analyzed for highlighting [18031] exceeded the allowed maximum of [10000] set for the next major Elastic version. For large texts, indexing with offsets or term vectors is recommended!
Solution?
Error 2: Request Timeout in Kibana

Can anyone help me to solve this issue?

Change the setting index.highlight.max_analyzed_offset to your limit which is possible for you.

the following curl command is used to set the offset, however it failed

curl -XPUT http://localhost:9200/_settings -H "Content-Type: application/json" -d '{ "index.highlight.max_analyzed_offset": 100000 }'

Please correct me if this curl command is correct

This is the error message

{"error":{"root_cause":[{"type":"json_parse_exception","reason":"Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: o
rg.elasticsearch.transport.netty4.ByteBufStreamInput@30fdf0f1; line: 1, column: 2]"}],"type":"json_parse_exception","reason":"Unexpected character (''' (code 39)): expected a valid value (number, Stri
ng, array, object, 'true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@30fdf0f1; line: 1, column: 2]"},"status":500}curl: (6) Could not resolve host: index.h
ighlight.max_analyzed_offset
curl: (6) Could not resolve host: 100000
curl: (3) [globbing] unmatched close brace/bracket in column 1

Hey @aswinikumari,
your curl command want´s to override the global settings, but you must configure it on a specific index, which requires an higherindex.highlight.max_analyzed_offset

Here you find an example:

Curl-Command
curl -XPUT "localhost:9200/your_example_index/_settings" -H 'Content-Type: application/json' -d'
{
    "index" : {
        "index.highlight.max_analyzed_offset" : 100000
    }
}
'

At least that's how I would understand it.

You can read more about updating indice settings here

Best regards,
Robert

Hi Team,

I'm able to increase the index.highlight.max_analyzed_offset = 100000, however Elasticseach throws error again as below

Caused by: java.lang.IllegalArgumentException: The length of text to be analyzed for highlighting [1126818] exceeded the
_ allowed maximum of [100000]. This maximum can be set by changing the [index.highlight.max_analyzed_offset] index level_
setting. For large texts, indexing with offsets or term vectors is recommended!

So, is there a way to turn of the highlighter, or to change the default boundary character?

This is urgent

1 Like

Hi Team,

Can someone help here on the previous issue I'm facing.

second question is , could you please advise, how to use term vectors

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