ES - dynamic field mapping

Dynamic field mapping

1、我们向es提交一个json对象进行索引,es会对json字段和索引字段进行字段类型适配。

规则如下:

2、string字段的转换规则

2.1 date detection

如果字符串符合es的date格式规则,则转换成date类型。

es的date格式规则:

"strict_date_optional_time","yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z"]

date detection是默认开启的,也可以手动关闭、或者自定义date格式。

2.2 numeric detection

numeric detection默认是关闭的,可以手动开启,开启后会对符合数值型规则的string字段转换成numerical字段。

猜你喜欢

转载自www.cnblogs.com/huangfox/p/9456300.html