I am trying to create a query like
Simply, I am trying to recreate this SQL query:
SELECT * FROM test where com_ref= 'ddfdfdfdf' and (fr_id = 511168 or fr_id = 511258 )
.
{ "query": { "bool": { "filter": { "bool": { "must": [ { "match_phrase": { "com_ref": "ddfdfdfdf" } }, { "bool": { "should": [ { "term": { "fr_id ": 511168 } }, { "term": { "fr_id ": 511258 } } ] } } ] } } } } }
But it's not getting any results I don't know what I am missing.
Also i need a working solution with filter context