I am trying to implement a conditional clause in a firestore query.
This is my code.
FirebaseFirestore db= FirebaseFirestore.getInstance();
db.collection("collection")
.whereNotEqualTo("field1",value1)
.whereGreaterThan("field2",start_value)
.whereLessThan("field2",end_value)
.get() ....//skip
I am getting the following error..
java.lang.IllegalArgumentException: All where filters with an inequality (notEqualTo, notIn, lessThan, lessThanOrEqualTo, greaterThan, or greaterThanOrEqualTo) must be on the same field. But you have filters on 'field1' and 'field2'
How can I query multiple conditions?