If no result use next query


#1

Hay!
I looking for a solution for this problem:

If my first query have no result use next query, else have to give back only the hits from the first query.

My code
"query": { "bool": { "should": [ { "match": { "model": { "query": "63090300", "boost": "5" } } }, { "match": { "ean": { "query": "63090300" } } } ] } }

In this example the hits are 2 (model matches, ean matches). But i want only the hit from the model, not ean.

Thanks in advance for help!!!


(system) #2