Elasticsearch 提供帮助类来生成JSON.
import static org.elasticsearch.common.xcontent.XContentFactory.*;
XContentBuilder builder = jsonBuilder()
.startObject()
.field("user", "kimchy")
.field("postDate", new Date())
.field("message", "trying out Elasticsearch")
.endObject()
使用elasticsearch的帮助类
最新推荐文章于 2023-07-18 10:02:07 发布