I undestand that I need an index for longer search querys in firestore. I am querying my docs like this: There are curretnly 5 tags in total, so do I have to create an index for every possible combination of tags? Because if so, I think I would have to have 120 (5 * 4 * 3 * 2) indexes.
Tag: google-cloud-platform
How do I add multiple documents in firebase 9 with javascript?
Their documentation only shows how to set multiple documents with batch, but I need to add new docs and doing it one by one with a loop seems like a bad solution Answer You can add a document using Batched Writes by creating a DocumentReference first as shown below: If you don’t want to use Batched Writes and use a
Gmail API : Extract “code” param from the URL of a pop-up window to get the access_token details
Iam trying to authenticate gmail using OAuth2 for my web application. From the server, we return a url to the client, which then uses that to open a pop-up. The code is as shown: From the pop-up , i want to extract the “code” param which google returns to us after the authentication is completed. But when i try to
What is the best way to reduce firestore document reads in chat app on page load?
I have a chat app that is charging me a large number of reads for each page load, 1 for each message to show. I’m trying to figure out a way to reduce that number and optimize for cost, as refreshing the page a few times costs hundreds of reads. The firestore pricing documentation says For queries other than document
Use firebase onSnapshot() in for loop?
The below code works for getting my data from firestore. I’m trying to update this to use onSnapshot() instead of of get(). Maybe the core of my confusion is onSnapshot() doesn’t return a promise and I’ve tried just adding the listeners into an array but it seems the data doesn’t get updated. How do I iterate over a for loop
Uncaught (in promise) FirebaseError: Expected type ‘rc’, but it was: a custom ac object
The error happens in this code: ** I am trying from 2 days but can’t understand what’s the problem !!** I am trying to add an array in firebase , i am tring so many solution but can’t get what’s the problem !! Answer The setDoc() function takes a DocumentReference as first parameter but you are passing a CollectionReference. If
Firestore Array of map not updating
So I’m working on a personal project to learn react-native and Firestore. I have a DB like this: And I want my code to add a new battery in the array batteries. The elements in the array are just a map{string, string} The problem is that when I update the array with a new brand that’s work but if I
How can I read data from firestore database in a schedule function? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. The community reviewed whether to reopen this question 1 year ago and left it closed: Original close reason(s) were not resolved Improve this question I’m new to Firebase
Getting `eslint’ – parsing error, while compiling firebase cloud function
Recently I’ve started working on a project based on firebase cloud functions and firestore database. I’m writing a cloud function trigger function which will query a “Collection group”, on a new document being created. Below is the cloud function code file: But while compiling i am being thrown the below error I tried a lot but I am unable to
CORS Policy blocking my API requests in a google cloud platform app engine in a live website
I uploaded my node js server to the google cloud app engine service to be able to make the front end work. I also uploaded the frontend and my website is now live. The node js is running fine and it’s deployed in the app engine in google cloud. my only problem is that whenever I try to make a