I wanted to create a mapping for movies
that look like:
{
title: \"The Artist\",
genres: [\"Drama\", \"Comedy\"]
}
In the El
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.