I’m using the Java Firestore library to access my Firestore database. I am making this Query
:
Query chatQuery = firestore.collection("chats")
.whereEqualTo("userId", userId)
.orderBy("seq", Query.Direction.ASCENDING);
// userId is already defined.
When I run it, it gives this error:
io.grpc.StatusRuntimeException: FAILED_PRECONDITION: The query requires an index. You can create it here: https://console.firebase.google.com/v1/r/project/...
However, my firestore index for the collection chats
exists:
How do I fix this?