Description
The first example on the terms agg page doesn't provide sample data and is somewhat misleading. For the example to work as-is, fielddata must be enabled on the genre field. Alternatively (preferably) you can use the keyword field, instead. Otherwise, you'll get the following error:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [color] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}],"
This sent someone looking at the Definitive Guide down a rabbit hole trying to run against 6.3.
https://www.elastic.co/blog/strings-are-dead-long-live-strings