Implement source facet
In order to do this I have adjusted the source
mapping, it is now a
keyword
with a supporting text
field.
terms aggregation should be a field of type keyword or any other data type suitable for bucket aggregations. In order to use it with text you will need to enable fielddata.
fielddata
is disabled by default.