Object datatype
Lucene has no concept of inner objects, so Elasticsearch flattens object hierarchies into a simple list of field names and values.
Nested datatype:The nested type is a specialised version of the object datatype。
Nested实际上就是Object的数组. Nested结构其实是个List结构。
If you need to index arrays of objects and to maintain the independence of each object in the array, you should use the nested datatype instead of the object datatype. Internally, nested objects index each object in the array as a separate hidden document, meaning that each nested object can be queried independently of the others, with the nested query
查找博客评论
https://blog.csdn.net/laoyang360/article/details/82950393
Elasticsearch 7.x 版本
Nested datatype
https://www.elastic.co/guide/en/elasticsearch/reference/7.3/nested.html
Nested query
https://www.elastic.co/guide/en/elasticsearch/reference/7.3/nested.html
Painless Scripting Language
https://www.elastic.co/guide/en/elasticsearch/painless/7.3/index.html
Elasticsearch 2.x 版本
https://www.elastic.co/guide/cn/elasticsearch/guide/current/nested-query.html
Elasticsearch 5.3 版本
Elasticsearch Nested List结构查询