使用Elasticsearch查询全部时报错
org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.lang.Long] for value ‘FCHWzYgBjGsveCR9T0T0’; nested exception is java.lang.NumberFormatException: For input string: “FCHWzYgBjGsveCR9T0T0”
原因:
插入数据时,未指定id,自动生成的id=“FCHWzYgBjGsveCR9T0T0”是一个字符串,而自定义的id是long类型,无法转换,查询时报错