I am working on ES 6.4.2, want to apply multiple analyzers to a field. I am looking to apply snowball and stop word. I tried thie below mapping is this the correct apporach.
PUT /some-index
{
"settings": {
"index": {
"number_of_shards": 5,
"number_of_replicas": 1,
"refresh_interval": "60s",
"analysis" : {
"analyzer" : {
"my_analyzer" : {
"tokenizer" : "standard",
"filter" : ["standard", "lowercase", "my_snow"]
},
"stop_analyzer": {
"type": "stop",
"stopwords": "_english_"
}
} ,
"filter" : {
"my_snow" : {
"type" : "snowball",
"language" : "Lovins"
}
}
}
}
},
"mappings": {
"doc": {
"_source": {
"enabled": true
},
"properties": {
"content": {
"type": "text",
"index": "true",
"store": true,
"analyzer":["my_analyzer","stop_analyzer"],
"search_analyzer": "my_analyzer"
},
"title": {
"type": "text",
"index": "true",
"store": true,
"analyzer":["my_analyzer","stop_analyzer"],
"search_analyzer": "my_analyzer"
}
}
}
}
}