The Set operations, e.g. Intersection
, will only work with two Sets or two Arrays but not on both at the same time. So in case #1 (user selects a list…) the intersection method is not going to work. I think there is a complicated way to make it work, but it’s at least as expensive as just reading the documents and filtering.
Each Get
will cost a Read Op, of course. Paginate costs a Read Op for each Match(Index(...))
involved. For example, Paginiate(Match(Index(...)))
costs 1 read op. If you Match on two Indexes and Intersection them, that’s 2 Read Ops.
EDIT: Different Set operations work differently, and I shouldn’t generalize the pricing. You should run queries and inspect them, either in the cloud shell or headers from the web requests. Cross referencing a discussion related to the cost of Set operations.
Mapping over a single index to Delete should cost 1 read op and N write ops, where N is the number of results.