Hi I'm trying to do exact match using filter, but it is not returning expacted result,
in result scrore is 0 but still it is returning documents by matching some words given in match query,
below is query:
GET history/saved_search/_search { "_source": "saved_search_name", "query": { "bool": { "filter": { "bool": { "must": [ { "match": { "login_name": "superman" } }, { "match": { "saved_search_name": "Low quality clothes" } } ] } } } } }
getting this as result
"hits": {
"total": 2,
"max_score": 0,
"hits": [
{
"_index": "history",
"_type": "saved_search",
"_id": "AVv2tSUeWjRMtjG_6lOM",
"_score": 0,
"_source": {
"saved_search_name": "Our preferred clothes"
}
},
{
"_index": "history",
"_type": "saved_search",
"_id": "AVv2rdFJWjRMtjG_6lOK",
"_score": 0,
"_source": {
"saved_search_name": "Quality clothes with."
}
}
]
}
this is setting of the index
{
"history": {
"aliases": {},
"mappings": {
"saved_search": {
"properties": {
"login_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"party_id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"saved_search_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
},
"settings": {
"index": {
"creation_date": "1493373943740",
"number_of_shards": "5",
"number_of_replicas": "1",
"uuid": "QDDPk5EuQR-8IgUDv33UeA",
"version": {
"created": "5030199"
},
"provided_name": "history"
}
}
}
}
Can any one help to solve this?
Thanks in advance