Exact match not working with fields having space

I have a set of data loaded in elasticsearch. I ran the below query.
GET /xxxxxxx/_search
{
"query": {
"bool": {
"filter":[{"term":{"title": "Product order details" }}]}}
}

And it returns

{
"took": 0,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}

But in elastic search there is an exact match for field "title" is present. Can someone help me on this.

Depends on analyzer used.
If you are using the default mapping, try the same query against title.keyword instead.

This one worked, thank you :slight_smile: