六、Elasticsearch的异常

2021-09-14  本文已影响0人  我爱福尔摩斯呀

1、vm.max_map_count

max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

解决方法:
在cmd中运行

wsl -d docker-desktop
sysctl -w vm.max_map_count=262144

2、

initial heap size [67108864] not equal to maximum heap size [134217728]; this can cause resize pauses

解决方法:
在jvm.options中设置-Xms和-Xmx相等
3、

field must be either [lat], [lon] or [geohash]

在使用GeoPoint在elasticsearch中写入geo_point类型数据时,出现这个序列化错误。是因为GeoPoint序列化结果包括lat、lon以及geohash字段,与elasticsearch要求的类型不符。在这里我没有使用重写序列化的方法,自定义个一个Location类解决问题。

上一篇下一篇

猜你喜欢

热点阅读