受欢迎的博客标签

Elasticsearch 嵌套对象(Nested List)查询

Published

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结构查询

https://czjxy881.github.io/elasticsearch/%E4%B8%80%E8%B5%B7%E6%9D%A5%E5%AD%A6ES-%E6%B5%85%E8%B0%88Nested%E7%BB%93%E6%9E%84/