firestore: Is there a way to perform or where query operation on collection?


Given I am a tutor

When I type comma separated list of search terms

e.g math,accounting

Then Expected

I should be able to see different documents having map field key term set to true

Then Actual

I get empty result

When I type comma separate terms that relates to the same document

I get the actual result


Is there or Operation for cloud firestore.

Kindly find below code snippet and screenshots:

Future<void> search(List<String> keywords) async {
    var docs = coursesRef.where('isDraft', isEqualTo: false);

    keywords.forEach((word) {
      String term = word.trim().toLowerCase();
      docs = docs.where('searchTerms.$term', isEqualTo: true);

    QuerySnapshot query = await docs.getDocuments();

    courses = [];
    query.documents.forEach((doc) {
      Course course = Course.fromDoc(doc);


Below screen shot for sample Map<String, bool>

enter image description here