# Multiple must conditions not working

**URL:** <https://discuss.elastic.co/t/multiple-must-conditions-not-working/132852>\
**Category:** Elasticsearch\
**Created:** [May 22, 2018, 4:34pm UTC](https://discuss.elastic.co/t/multiple-must-conditions-not-working/132852 "2018-05-22T16:34:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyteen4a03](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tyteen4a03/32/31482_2.png) [@tyteen4a03](https://discuss.elastic.co/u/tyteen4a03)\
**Post date:** [May 22, 2018, 4:34pm UTC](https://discuss.elastic.co/t/multiple-must-conditions-not-working/132852/1 "2018-05-22T16:34:12Z")

</div>

I'm trying to run this query on ES 5.4:

```
POST /_search?pretty&size=500
{
"query": {
	"bool": {
		"must": [
			{
				"match": {
					"tags": "MY_TAG"
				}
			},
			{
				"range": {
					"timestamp": {
						"gt": 0,
						"format": "epoch_millis"
					}
				}
			}
		]
	}
}

```

(If it's not obvious, the document should have the tag `MY_TAG`, and the timestamp of the document should be greater than 0 (i.e. document should be created after this timestamp))

If I have either the match tag condition or the timestamp greater-then condition, the search returns something. However if I have them both together, the search returns an empty set. Does anybody know what I'm doing wrong?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 19, 2018, 4:34pm UTC](https://discuss.elastic.co/t/multiple-must-conditions-not-working/132852/2 "2018-06-19T16:34:18Z")

</div>

Closed on June 19, 2018, 4:34pm UTC

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