elasticsearch nested 对象
创建测试数据
DELETE student # 创建 Nested 对象 Mapping PUT student { "mappings" : { "properties" : { "name" : { "type": "nested", "properties" : { "first_name" : {"type" : "keyword"}, "last_name" : {"type" : "keyword"} }}, "commet" : { "type" : "text", "fields" : {"keyword":{"type":"keyword","ignore_above":256}} } } } } POST student/_doc/1 { "commet":"good", "name":[ { "first_name":"wang ", "last_name":"er" }, { "first_name":"zhang", "last_name":"san" } ] }
Nested 查询 ,hit 为0 ,表示正确
# Nested Aggregation
每天进步一点点,多思考,多总结
版权声明:本文为CNblog博主「zaituzhong」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。