I have a collection of documents, where each document has an attribute called "position" that can take one of the possible String values: A, B, C, D, E ... (from an ENUM that controls the object state machine )
How can I create a query in firestore to return documents whose value for the "position" attribute is "A" or "D"?
In Firestore documentation it is possible to understand that there is no implementation of the difference logical operator. Compound Queries only meet the "AND" condition on a single ATTRIBUTE value.
In this particular case, I cannot change attribute type because in future other elements may be added and cause requirements problems if I work with a numeric range.
I thought of making two queries and merge the result. But it would be horrible to do that with pagination and complex queries (doesn't work). In addition to running two queries, the more conditions I need to adjust in the future, the more code maintenance and more queries! right?
Is there any way to solve this problem?