Yes, you can use the multipleQueries method with the strategy parameter set to a value of stopIfEnoughMatches.
The strategy of the multipleQueries method can be one of the following values:
-
none: Execute the sequence of queries until the end. This is recommended when each query is of equal importance, meaning all records of all queries need to be returned.
-
stopIfEnoughMatches: Execute queries one by one, but stop as soon as the cumulated number of hits is at leasthitsPerPage. This is recommended when each query is an alternative, and where, if the first returns enough records, there is no need to perform the remaining queries.