I have a field which uses a particular analyzer. For a scenario, i want the field to be matched without any analyzer being applied. So I ma using fielname.keyword for the match query. This query doesn't return value for search string which exactly matches the data in that field. This happens only f or fewer records.
Note: The field has email ids as comma separated string.
Below returns data for few records and doesn't return data for few others
<
DELETE members
PUT members/_settings
{
"analysis":{
"analyzer":{
"a1":{
"tokenizer": "comma"
}
}
}
}
PUT members/data/_mapping
{
"properties": {
"emailIds":{
"type": "text",
"analyzer": "a1"
}
}
}
PUT members/data/1
{
"emailIds": "abc@domain.com,xyz@domain2.com"
}
GET index/_search
{
"query": {
"match": {
"emailsIds.keyword":"abc@domain.com,xyz@domain2.com"
}
}
}
/>