创建模版
curl -H "content-type:application/json" -XPUT es.dsj.inkept.cn/my_movies -d'{
"mappings" : {
"ymd" : {
"properties" : {
"actors" : {
"type": "nested",
"properties" : {
"first_name" : {"type" : "keyword"},
"last_name" : {"type" : "keyword"}
}},
"title" : {
"type" : "text",
"fields" : {"keyword":{"type":"keyword","ignore_above":256}}
}
}
}
}
}'
插入数据
curl -H "con

本文介绍了如何在Elasticsearch(ES)中使用nested字段类型来处理复杂的数据结构,包括创建模板、插入数据的步骤,并通过具体的查询案例展示了查询过程及结果。
最低0.47元/天 解锁文章
1513

被折叠的 条评论
为什么被折叠?



