当前位置:网站首页>Es log error appreciation -limit of total fields

Es log error appreciation -limit of total fields

2022-07-07 13:52:00 Es assistant

Error reporting

[o.e.a.a.i.m.p.TransportPutMappingAction] [------nodeid-------] failed to put mappings on indices [[[--------IndexName---------]]], type [doc]
java.lang.IllegalArgumentException: Limit of total fields [1000] in index [--------IndexName---------] has been exceeded
	at org.elasticsearch.index.mapper.MapperService.checkTotalFieldsLimit(MapperService.java:656) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:537) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:415) ~[elasticsearch-6.8.2.jar:6.8.2]

Error reporting analysis

This problem is an error in writing ,ES By default, a single index is restricted 1000 A field , Because too many fields defined in the index will lead to mapping The surge of , Thus causing memory errors and difficult to recover .

This problem is common after log splitting , Automatic update update mapping, Due to abnormal log splitting logic , As a result, many abnormal fields are mistaken for new fields , Cause index maaping The field surge is greater than 1000. Cause update error .

Solution

1- Adjust index setting, Temporarily increase the limit of the number of fields , In the following ways my_index To report an error index name .

PUT my_index/_settings
{
"index.mapping.total_fields.limit": 2000
}  
 This is set to 2000   Maximum index 

2- Check the reasons for the surge in the number of fields on the business side , Reduce the number of single index fields .

原网站

版权声明
本文为[Es assistant]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071146402260.html