Skip to content

Why does my query require a COLLECTION_GROUP_ASC index? #234

Answered by fenix-hub
pndalal asked this question in Q&A
Discussion options

You must be logged in to vote

@pndalal Hi,
I'm noticing that you are using two times the .from function.
I suppose that your .from("questions") is correct, but to use an operator you have to issue the .where() function on the query:

query.from("questions")
query.where("text", FirestoreQuery.OPERATOR.EQUAL, "What's your name?")

Anyway indexing should be always needed for any query regarding collections. The error you are getting should also print in console a link. If you click it (or copy/paste it) it will navigate you to the page where you can set the indexes.

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
4 replies
@pndalal
Comment options

@WolfgangSenff
Comment options

@pndalal
Comment options

@pndalal
Comment options

Comment options

You must be logged in to vote
7 replies
@pndalal
Comment options

@pndalal
Comment options

@fenix-hub
Comment options

@pndalal
Comment options

@fenix-hub
Comment options

Answer selected by fenix-hub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants