Hi, thanks for taking the time to read this!
I'm trying to re-create in ElasticSearch the 'OR' statement of SQL databases, something like this:
SELECT * FROM table WHERE id = 10 OR name = 'name'
However the queries are way more complicated than that, now my question is, is it possible to have two completely separated search queries that I can join and run them together because if I run them separated I'll have issues for pagination since the results will be shown together.
Search Query 1:
{ "query": { "filtered": { "query": { "bool": { "must": [], "must_not": [], "should": [], "minimum_number_should_match": 1 } }, "filter": { "bool": { "must": [ { "terms": { "source_id": [ 118 ] } } ], "must_not": [] } } } }, "from": 0, "size": 30, "sort": [ { "publication_date": { "order": "desc" } } ] }
Search Query 2:
{ "query": { "filtered": { "query": { "bool": { "must": [ { "range": { "publication_date": { "gte": "2016-06-28T00:00:00+00:00", "lte": "2016-06-28T23:59:59+00:00" } } } ], "must_not": [], "should": [], "minimum_number_should_match": 1 } }, "filter": { "bool": { "must": [], "must_not": [] } } } }, "from": 0, "size": 30, "sort": [ { "publication_date": { "order": "desc" } } ] }