使用 shuf 来打乱一个文件中的行或是选择文件中一个随机的行。

java中date 属性 如何存储到elastic中的date类型的字段

Elasticsearch | 作者 little_heart | 发布于2017年06月08日 | 阅读数:5991

在java中创建了一个java.util.date类型的对象,在存入elastic的时候总是报错。
Servlet.service() for servlet [dispatcher] in context with path [/travellingsync-social] threw exception [Request processing failed; nested exception is MapperParsingException[failed to parse [travelDate.beginDate]]; nested: IllegalStateException[Can't get text on a START_OBJECT at 1:403];] with root cause
其中 travelDate是我创建的一个类。beginDate是其中一个字段,类型为java.util.date

问:java 中的date类型如何存入到elastic中?
已邀请:

要回复问题请先登录注册