I need the exact match result from elastic search query
I tried keeping index as "not analysed" while indexing using this curl command:
curl -X PUT es/_doc/all -H'Content-Type: application/json' -d '{
"mappings": {
"dynamic_templates": [
{
"example_string_as_object": {
"match_mapping_type": "object",
"match": "x-example",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
}
]
}
}'
But still, when I try a query with "account-validity", I am getting the result of both 'account' and 'validity'.
I need the result showing document that only have "account-validity". The query I am using:
es/_search?size=1000&from=0&q=account-validity&pretty=true
can someone please help me with this