Within my database, there is a document located at: https://i.stack.imgur.com/OTZpd.png
I am attempting to query the number of messages documents where the user's ID does not appear in the "read_by" array. This is the code I am currently using:
const q = query(messagesRef, where('read_by', 'not-in', [user.uid]))
const docs = await getDocs(q)
Unfortunately, this particular condition is not functioning as expected. It continues to return 2 documents, even though both contain the user's ID within the array. I have verified that the "user.uid" is accurate and returns the correct user id.