Autocomplete with filtered data

I have a list of User IDs similar to
let userIds = [ID1, ID2, ID3, ID4…]

Some of the fields within the users documents arefirstName and lastName. I want to first get the ids in the userIds list and then perform a partial text search/autocomplete search on the remaining documents. How do I go about doing that?

The compound operator with the first clause as a filter clause on the userID field. The firstName and lastName can be autocomplete queries in a should clause. Keep in mind, we can filter best