QueryBuilderQuery

if suppose i want to write query like

select * from xyz where a="abc" and (createdDate between "?" and aprovedDate betwenn "?")

My intention is to write Query Builder query using this.

you need a bool query, that contains three must clauses. One is a term query for the a field and the other two are range queries. you can use the QueryBuilders class to create those queries.

See https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-search.html

a="abc " this condition always execute no matter what other condition is. Your solution is not creating proper query which is expected.

For eg:
select * from m_country where approval_status="SAVED" or (created_date= "2017-12-30" or approved_date ="2017-12-30")

Status result should be there other date related condition can be "AND" or "OR" no matter.