Elasticsearch超过最大字段长度-Kibana中的错误 [英] Exceeding maximum length of field in elasticsearch - error in kibana

查看:1623
本文介绍了Elasticsearch超过最大字段长度-Kibana中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发现:[prod_logs]索引的[-CSnZmwB_xkQcDCOrP1V] doc的[message]字段的长度已超过[1000000]-允许分析突出显示的最大值。可以通过更改[index.highlight.max_analyzed_offset]索引级别设置来设置此最大值。对于大文本,建议使用偏移量或术语向量进行索引!

Discover: The length of [message] field of [-CSnZmwB_xkQcDCOrP1V] doc of [prod_logs] index has exceeded [1000000] - maximum allowed to be analyzed for highlighting. 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!

我在Kibana中遇到上述错误。我使用ELK版本7.2.0。

I get the above error in Kibana. I use ELK version 7.2.0. Answers / Suggestions are most welcome.

推荐答案

您应该更改映射。如果无法更新映射,请创建一个临时新索引,然后在大文本字段中添加 term_vector

You should change your mapping.If you can not update your mapping create a temp new index.And add term_vector your big text field


mappings:{
properties:{
sample_field:{
type: text,
term_vector: with_positions_offsets
}
}
}

"mappings": { "properties": { "sample_field": { "type": "text", "term_vector": "with_positions_offsets" } } }

然后将数据克隆到新索引。

Then clone your data to new index.


POST / _reindex
{
source:{
index: old_index
},
dest:{
index: new_index
}
}

POST /_reindex { "source": { "index": "old_index" }, "dest": { "index": "new_index" } }

然后使用统一


highlight:{
fields:{
textString:{
类型:统一
}
}

"highlight": { "fields": { "textString": { "type": "unified" } }

这样。

这篇关于Elasticsearch超过最大字段长度-Kibana中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆