I am using google cloud firestore as a database for a flutter application. My code requires that I make a request containing '.where("X", "in", "very-long-list")' to the database. The issue that arises is an 'in' operator can only combine up to 10 equality clauses while my list is of variable length that may end up significantly larger than 10. I am looking for possible workaround to the issue.
An example statement:
citiesRef.where("state", "in", "[list-of-1000]");
Edit: To give additional context, my project is a social media application where users have friends. The database is to being restructured such that a user document has a subcollection 'friends' with a document containing their user id. A user document also has a collection called posts with references to a chronologically ordered post collection. Within the posts collection, each post document has a document containing their UID. To create a user's feed, the post collection is to be referenced and filtered using '.where["UID", "in", ["List-of_friend-UIDs"])'. If you know of a better structure I am very open to restructuring my database.