I am trying to run the below Stream
, but this returns all the documents, completely ignoring the whereNotIn
operator in Firebase Firestore.
FirebaseFirestore.instance
.collection('announcements')
.where("announcementReaders",
whereNotIn: [
"VAJDWALLfHQUKbOFTqz3JW2GhHC2"
]).snapshots(),
This is the structure of my database
I was expecting it to not return this document, since it's announcementReaders
array contains the ID I am explicitly searching to not return, but it shows it anyway.
I have eliminated other minor issues, such as spelling mistakes, index creation, ui mishaps, etc. I have this query in a StreamBuilder
, and when I replace the query without a whereNotIn
, it gives me the same result, implying that it is ignoring the whereNotIn
operator. This issue also happens with arrayContains
, where even if the announcementReaders
array contains the ID, it will ignore it.