I apologize for having to ask this question, I have been researching countless links but have not been able to find it. It seems simple but has been far from it.
I know that you can not do a not equal to query in firestore, thus my code is the following:
private void getNotEqual() {
// db defined elsewhere
Query query = db.collection("collection")
.whereLessThan("uid", user.getUid())
.whereGreaterThan("uid", user.getUid())
.orderBy("uid");
query.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
Log.d(TAG, "Size: " + task.getResult().size());
}
});
}
But it is still not returning the documents where it is not equal. The Uid is from Firebase Authentication and is stored as a string as a field in the document. Am I missing something here?
Thank you sincerely in advance.