背景
Unindexed fileds can not be searched
右侧则有感叹号提示
No cached mapping for this field. Refresh field list from the Management > Index Patterns page
浅析
索引模式(Index Pattern)是用于定义OpenSearch中索引的元数据信息的。它包含了索引中包含的所有字段的名称、数据类型、分析器、存储方式等信息。当用户进行搜索或聚合操作时,Kibana需要根据字段映射信息来解析查询请求,以便正确地查询并返回结果。
解决这个问题的方法是在Kibana的管理页面中刷新字段列表,以确保所有字段的映射信息都是最新的。在这个页面中,Kibana会缓存映射信息以提高性能,如果新加入了一个字段,则需要刷新字段列表才能使其可搜索。
解决
Stack Management进入 Index patterns
页面,找到对应的索引模式,点击右上角刷新按钮
Trying to retrieve too many docvalue_fields. Must be less than or equal to: [100] but was [215]. This limit can be set by changing the [index.max_docvalue_fields_search] index level setting
由于我们刷新了字段列表,导致搜索的字段超过了默认100的上限,最简单的方法是在【Dev Tools】里用下面REST API上调该索引模式的max_docvalue_fields_search
PUT /your-index-*/_settings
{
"index" : {
"max_docvalue_fields_search" : 300
}
}
成功后会返回"acknowledged" : true
。
参考
https://github.com/elastic/kibana/issues/22897