I have a question regarding to ElasticSearch queries. I have a field called “name” that is defined with an analyzer from the phonetic plugin.
"name" : {
"type" : "string",
"store" : "yes",
"index" : "analyzed",
"analyzer" : "soundsAnalyzer",
"boost" : 10.0
},
Everything works fine so far! However I have a certain query on this field where I wanna get exact matches rather than similar sounded matches. I tried to accomplish this by using a term query as well as a text query. The term query doesn’t return any result at all and I have no glue why. By using the text query and defining another analyzer I get also nothing. I've tried the following query:
{
"query": {
"text": {
"documents.name": {
"query": "England",
"analyzer": "plainAnalyzer"
}
}
}
}
So my question, how can I accomplish avoiding the defined analyzer in the mapping just for this certain query to get exact matches? TIA