- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 98字
- 2021-06-24 14:52:02
How it works...
Elasticsearch transparently manages the array: there is no difference if you declare a single value or a multi-value due to its Lucene core nature.
Multi-values for fields are managed in Lucene, and so you can add them to a document with the same field name. For people with a SQL background, this behavior may be quite strange, but this is a key point in the NoSQL world as it reduces the need for the join query and creates different tables to manage multi-values. An array of embedded objects has the same behavior as simple fields.