Use $search instead of $match when using $in conditions

During a recent training, I learned about the benefits of using the $searchoperator.
I would like to modify my $match query to use $search instead.
However, I couldn’t find an equivalent for the $in operator.

When the fields need to match a single ObjectId, there is no problem, I can use the compound operator with must + equals and it works.

The problem arises when I have multiple ObjectId values.
Again, if it’s only for one field, I could use should + equals while specifying minimumShouldMatch: 1.

But I’m not sure how to handle it if I have multiple fields with multiple ObjectId values…
How should I approach transforming a query like this using the $search operator?

 { '$match':
     { '$and':
        [ { customer:
             { '$in': [ 5f3d6c51f5b2ed74fe93dd60, 5c221b4e4d17f1734806b4a5 ] } },
          { carrier: { '$in': [ 'carrier1', 'carrier2', 'carrier3' ] } },
          { status: { '$in': [ 'late', 'idle', 'delivered-late' ] } },
          { createDate: { '$gte': 2023-06-01T04:00:00.000Z } },
          { createDate: { '$lte': 2023-07-01T03:59:59.999Z } } ] } 
}

Hi @MLR,

Do you have some sample document(s) you could provide and advise which ones you expect being returned?

I could do some testing based off those but i’m not entirely sure off the top of my head if there is an equivalent to this in $search but will see what I can find out. Just want to see some sample documents + expected output to verify if it’s possible.

Regards,
Jason