Multiple Field Search to get single matched document

Using a query array of values, each clause generated becomes a “should” (optional) clause. You have that wrapped in a single must clause, so any of those must match, but not necessarily all of them. If you require all the query values to match, separate them individually into other items in your must array.

1 Like