#Possible to do an OR in withIndex
4 messages · Page 1 of 1 (latest)
A withIndex query returns a contiguous range of documents, when the documents are sorted by the index field. So if you want to do an OR you can do two withIndex queries and merge the results.
In this very specific case, if the field can be only undefined, false, or true, you can use the ordering of undefined < false < true to query with q.lte("field", false) or q.lt("field", true) because that's a contiguous range