elasticsearch报错:exceeds the [index.highlight.max_analyzed_offset] limit [1000000]
Posted zhangphil
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elasticsearch报错:exceeds the [index.highlight.max_analyzed_offset] limit [1000000]相关的知识,希望对你有一定的参考价值。
elasticsearch报错:exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them.
The length [27277624] of field [content] in doc[2]/index[1234567890abcdefg] exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them.
*************************************************************************************
Found index level settings on node level configuration.Since elasticsearch 5.x index level settings can NOT be set on the nodes
configuration like the elasticsearch.yaml, in system properties or command line
arguments.In order to upgrade all indices the settings must be updated via the
/$index/_settings API. Unless all settings are dynamic all indices must be closed
in order to apply the upgradeIndices created in the future should use index templates
to set default values.Please ensure all required values are updated on all indices by executing:
curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '
"index.highlight.max_analyzed_offset" : "999999999"
'
意思是说es从5.*开始,不能在elasticsearch .yaml里面设置index.highlight.max_analyzed_offset了,需要通过配置文件或者http的PUT命令设置进去index.highlight.max_analyzed_offset。
解决方案,用postman或者任意一个可以post http值和参数的工具,对目标主机上部署的es进行put命令配置:
http://localhost:9200/_all/_settings?preserve_existing=true
注意,不是get或者post,而是PUT。
PUT的body请求体需要加上,内容:
"index.highlight.max_analyzed_offset" : "999999999"
es启动起来后,在执行http的put。
如果一切正常,es对于这个http的put返回确认结果:
"acknowledged": true
同时,在es的运行控制台会输出:
updating [index.highlight.max_analyzed_offset] from [1000000] to [999999999]
以上是关于elasticsearch报错:exceeds the [index.highlight.max_analyzed_offset] limit [1000000]的主要内容,如果未能解决你的问题,请参考以下文章
解决控制台报错:Uncaught RangeError: Maximum call stack size exceeded
解决控制台报错:Uncaught RangeError: Maximum call stack size exceeded
Elasticsearch错误Exceeded flood-stage watermark导致index has read-only-allow-delete block
impala 查询报错Memory limit exceeded
python递归深度报错--RuntimeError: maximum recursion depth exceeded