I am using firestore in my application and I had like to sort for all the document which their field "Type" value is "manual" and to sort them according to other field called "DateCreated".
Im trying to do the following but I get no results:
db.collection( "Items" ).whereEqualTo( "Type", "manual" ).orderBy( "DateCreated", Query.Direction.DESCENDING ).limit( 20).get()
.addOnSuccessListener( queryDocumentSnapshots -> {
....
} );
Is there any reason that it won't work?
If I cancel the type query then I might get that the 20 returned items are all not from the type I need and therefore no results will be good for me.
Thank you