Received an exception FAILED_PRECONDITION: The query requires an index [duplicate]
问题 This question already has an answer here : Firestore whereEqualTo, orderBy and limit(1) not working (1 answer) Closed 5 days ago . I create the project in firebase using a cloud database and I want to compare empUID field which store in a document with current UID . I created one query which gets the data when current UID and empUID is match but failed to get data. Please guide is my Query right or am I need to changes in my code MY Subcollection Path Employer(root Collection)-->Job Post(Sub