Should Inside Must

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

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.