Reputation: 23
I've seen the indexing option on the cloud firestore and I was curious how to actually use it in my program to query for users with a certain username or a certain email. I've already made my index but I'm now stuck because I don't know how to use it in my program and I couldn't find anything helpful in the documentation.
Thanks in advance.
Upvotes: 1
Views: 952
Reputation: 2018
Normally you don't need to create indexes unless you are doing some filtering and sorting on multiple fields. Per default firestore has an index on every field. If firestore needs a combination if indexes normally it would output an exception that lets you know that and you get a link that will automatically create the necessary indexes. So in your case read the docs on how to create a query: https://firebase.google.com/docs/firestore/query-data/queries
Upvotes: 1