If I have a simple collection such as:
Fruits:
Banana:
title: \"Banana\"
vitamins: [\"potassium\",\"B6\",\"C\"]
Apple:
title: \"Apple\"
vitam
Firestore introduced the whereIn, arrayContains and arrayContainsAny methods in late 2019. These methods perform logical 'OR' queries, but have a limit of 10 clauses you can pass in (so max 10 vitamins you can search for).
Some solutions already mentioned restructuring your data. Another solution leveraging the restructuring approach is to not include the Vitamins into the Fruit document, but the other way around. This way you get all the documents 'Banana' is part of.
let vitaminsRef = db.collection('Vitamins').where('fruits', arrayContains: 'banana');
This solution allows you to circumvent the limit of 10 clauses. It gets all the 'Vitamin' documents that have 'Banana' in their 'Fruits' array in one read operation (think about pagination, if too many).