The documentation states:
However, if you have a filter with range matching (<, <=,>,> =), your first order must be in the same field:
This means that I can use comparison without range, == ==, with the orderBy clause. But this fails:
myCollectionRef.where('age', '==', 2).orderBy('name');
source
share