For this particular scripted field you don't need that elasticsearch.yml setting since you're not using a regex, but it shouldn't hurt either.
To be used in a scripted field, I think fields have to be both
aggregatable as seen in the fields tab for the index pattern. I think you're keyword should show checkmarks in those columns. But please check to be sure.
Next, in your scripted field did you set;
Language: painless ("expression" only works on numeric values)
Popularity: 1 or greater just makes it rise up to the top in the field list on Discover so it's easier to find if you have a lot of fields
I just created on for host.keyword like above and it works OK.
Oh, one more thing, does EVERY document in your index have a value for that field? If not, that could be a problem. You can work around it but you have to add a check in your script.
You can check if that field "exists" in the Discover tab. First you would have to remove the scripted field so Discover works again.
In Discover, with some results, click the little right arrow to expand one of the docs.
Find your TigerLayer field and click the
* to filter only docs where that field exists.
If your count changed that would indicate not all docs have that field.
Or you can mouse-over the exists filter up near the query bar and click the magniying glass with the
- in it to invert the filter so it only shows docs where that field does not exist.
If that's the case, let me know and I'll find an example of a script to work around it.