I have a strange behavior on elasticsearch that I cant explain.
When I do :
POST /ad_search/_search
{
"query": {
"match": {
"city_code": "2A247"
}
}
}
I have multiple result. But when I do (This code is generated by a librairies) :
POST /ad_search/_search
{
"from":0,
"query": {
"bool": {
"must":[
{"term":{"city_code":"2A247"}}
]
}
}
}
I have no result.
When I search on all other zip_code with only numbers like 71459. The both query are working well and give me the same result.
I was thinking of a mapping problems but it seems ok :
GET /ad_search/_mapping
{
"ad_search" : {
"mappings" : {
"properties" : {
"city_code" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
}
}
}
Someone have any ideas to unlock me ?
Thank you