# Disable other conditions in query if first one works

**URL:** <https://discuss.elastic.co/t/disable-other-conditions-in-query-if-first-one-works/202810>\
**Category:** Elasticsearch\
**Created:** [October 9, 2019, 10:11am UTC](https://discuss.elastic.co/t/disable-other-conditions-in-query-if-first-one-works/202810 "2019-10-09T10:11:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Behemo1h](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/behemo1h/32/130721_2.png) [@Behemo1h](https://discuss.elastic.co/u/Behemo1h)\
**Post date:** [October 9, 2019, 10:11am UTC](https://discuss.elastic.co/t/disable-other-conditions-in-query-if-first-one-works/202810/1 "2019-10-09T10:11:14Z")

</div>

Hi guys, for example i have 2 field, title1, title2  
I have 2 condition for search:  
'should'=\>[  
{  
'term'=\>{  
'title1'=\>'onetwofree'  
}  
},  
{  
'term'=\>{  
'title1'=\>'freetwoone'  
}  
}  
]

So i need if 1st condition ('onetwofree') not found any docs, search by second condition. Scroing useless in this case. I need or exactly totaly equal my first condition or all other by other (second in my case)

Ty guys

---

<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:** [November 6, 2019, 10:11am UTC](https://discuss.elastic.co/t/disable-other-conditions-in-query-if-first-one-works/202810/2 "2019-11-06T10:11:21Z")

</div>

Closed on November 6, 2019, 10:11am UTC

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