发现:[prod_logs]索引的[-CSnZmwB_xkQcDCOrP1V] doc的[message]字段长度超过[1000000]-允许分析突出显示的最大值。可以通过更改[index.highlight.max_analyzed_offset]索引级别设置来设置此最大值。对于大文本,建议使用偏移量或术语 vector 进行索引!
我在Kibana中收到上述错误。我使用ELK版本7.2.0。答案/建议是最欢迎的。
最佳答案
您应该更改映射。如果无法更新映射,请创建一个临时的新索引。然后在大文本字段中添加 term_vector
"mappings": { "properties": { "sample_field": { "type": "text", "term_vector": "with_positions_offsets" } } }
然后将数据克隆到新索引。
POST /_reindex { "source": { "index": "old_index" }, "dest": { "index": "new_index" } }
然后在突出显示查询中使用“统一”。
"highlight": { "fields": { "textString": { "type": "unified" } }
像那样。
关于elasticsearch - Elasticsearch超过最大字段长度-Kibana中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57375286/