上QQ阅读APP看书,第一时间看更新
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.