I created an index called my_index
by this command
{
"settings": {
"number_of_shards": 1,
"analysis": {
"filter": {
"synonym": {
"type": "synonym",
"lenient": "true",
"synonyms": [
...
...
...
]
}
},
"analyzer": {
"synonym": {
"filter": [
"uppercase",
"synonym"
],
"tokenizer": "whitespace"
}
}
}
},
"mappings": {
"items": {
"properties": {
"country": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"information": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
},
"analyzer": "synonym"
},
"person": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
inside information
, I had a data that looks like this 100 /INDIA/2022
(pay attention to the space after 100). If i search for 100/INDIA/2022
(no space after 100), Elasticsearch will return nothing. If I create new index with no analyzer, 100/INDIA/2022
will return the expected result. Can someone help me for this problem?