How to use an Array mapping in ES?

So ElasticSearch doesn’t need to specify that a mapping is an array. You can treat any mapping as an array by using square brackets:

{
    title: ["The Artist", "Formerly known as Prince" ],
    genres: ["Drama", "Comedy"],
    ...
}

See the last sentence on the page:

We could, of course, name the field as tag and skip the index_name all together

The “index_name” mapping just allows you to define an alias in the plural form of tag -> tags.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)