Why, if I've written an analyzer for Elasticsearch which works when I use the analysis API endpoint, does it not get picked up and used when I set the mapping for a field to that analyzer?
This works:
GET cobalt_strike/_analyze
{
"text": [
"gov.domain.org",
"mfa.gov.domain.org",
"justice.gov.domain.org"
],
"analyzer": "domain_name_analyzer"
}
This doesn't:
"host_domains" : {
"type" : "text",
"analyzer" : "domain_name_analyzer"
},
What am I doing wrong? Thanks.