Changed a Firestore query and index link is no longer showing in console

Viewed 35

I recently changed a query by adding a .where clause after which the Firebase index link is not showing in the console. Can this index link be retrieved in any other way?

Added the .where('active ...

let ref = db.collection("users")
            .where('active', "==", true)
            .orderBy("votes", "desc").limit(25);

        ref.onSnapshot((querySnapshot) => { ...

Console message:

Uncaught Error in snapshot listener: FirebaseError: no matching index found.
    at new e (prebuilt-89214b55-2a7b2673.js:418)
    at prebuilt-89214b55-2a7b2673.js:11050
    at prebuilt-89214b55-2a7b2673.js:11051
    at e.onMessage (prebuilt-89214b55-2a7b2673.js:11073)
    at prebuilt-89214b55-2a7b2673.js:10990
    at prebuilt-89214b55-2a7b2673.js:11021
    at prebuilt-89214b55-2a7b2673.js:15973
1 Answers

A workaround is to create a cloud function that executes the query. Calling the function will log an error that includes the url to create the index.

Related