Best firestore video so far. Really calls a spade for a spade, talks about what you can do, what will be developed and what you can’t do. And many examples. Perfect. I am so tired of videos where everything is just perfect and avoiding the elephant in the room.
ikr! I'm seriously troubled by the fact that it says it was published May 2018... you can either edit UA-cam videos with some sorcery I don't know, or they have a perfectly nice roadmap way ahead in time... I don't know.
@@HieuNguyen-vk7ix They should not do this tho its really dangerous, if suppose there's a really old video and someone describes newly found innovations in it the people who are the inventors of those innovations will have a hard time getting patents for those innovations. In fact if the tech in this video is patented by them in 2019 they might as well get into trouble.
Brief, but insightful, and a good bridge for the folks coming from a relational DB background. Structuring data to suit Firestore's query capabilities is the key takeaway here - that should be mentioned in the description. It's easy to miss it thinking "ah, I know how to query" - I know I nearly did.
This is great series. You are doing great job explaining basic behavior and are charismatic in the process which is rare in this kinda videos. Playlists also sure help a lot. Keep up the good work :)
Seeing this video pop up on my alerts made my day. And actually watching it was just as much fun and just as informative as I expected it to be. So.... when's the next one coming??
I continue to be so impressed by the documentation and resources available for Google Cloud Platform. I learned to code less than two years ago and now I am creating Cloud Run services to query our firestore database, developing small apps that read and write to BigQuery, and designing SLO's. GCP is the best. (Also, 2019 Todd had such a glow-up!)
Had to go through variouse tutorials before understanding how I should make a propper query for Firebase, I think there might be a lack of examples in the docs and also in this video.
How do you create a denormalized query output which can be populated from different nest collections ? Also can you also join results from different nested collections from different Firestore Projects ?
You guys should do a serie about Elasticsearch integration cause it seems a little frustrating not having this option til now. We need 'like' queries indeed.
How come the OR (||) operator doesn't work like stated in 8:03 but when using the "in" operator like where("someProp", "in", ["value1", "value2"]) works in firestore?
Hi Todd, may i ask how is the index/ document id created/name? 5:44 Please correct me if i am wrong, I believe that how indexing work is create individual tables for each field name e.g. address - 1 table and crusine - 1 table. 9:48 Within each table is the value and its location
Great video. As querying a collection automatically generates an index, this raises a whole bunch of questions... How can we see what indexes are in use? Does a one-off query cause an index to be built and maintained for the lifetime of a collection? What is the storage cost penalty for each index? Can we remove an index? Does having more indexes slow down document write speed, or are indexes eventually consistent?
Wow, lots of great questions. I'll try to answer what I can quickly: 1) there is no way to see what indexes are used. But while it would be interesting to see the query plan, you can't affect it. No matter how you write the query, the indexes used will be the same. 2) If you don't need a composite index anymore, you can delete it from the console. 3) there is no charge for index storage. 4) yes, you can remove any composite index from the console 5) I haven't gathered any such performance metrics for this yet. I you get to them, I'd love to see the results.
#askFirebase on 9:30 - "select all restaurants where zip=94045 and ang_rating > 4.6" why can't you binary search each index document id from the right side in the left side?
I can't say that I fully understood the difference between an equality and inequality search, I got an idea, but I wouldn't be sure about what I would code. If I start from the Restaurant in S. Francisco (iii), and then I Zig to the Japanese one with the same id (iii), and then the next Japanese one (ttt) which sends me back to the ones in S. Francisco (ttt), how can I be sure that I haven't skipped some in the S. Francisco list between iii and ttt? This would assume that the Japanese restaurants are also sorted by City, but with other fields and possibly changes happening is this really always true and reliable? Did I just describe that it could be an "inequality" search where there's no certain relationship between the order of the two fields?
At 2:50 , when you say “ 200 of this things “ do you mean 200 Collection group queries or 200 Documents to search through per Collection group query or 200 results per Collection group query
Great walk through, however, my dashboard brings up Datastore (not Firestore) where I can add "entities"; I want to use Firestore and create collections and docs. I have clicked on every dev and admin option and still end up in the same place. What went wrong??
"the time it takes to run a query is proportional to the number of results, NOT the number of documents you're searching through" MY LIFE IS A LIE. This goes against everything I thought I knew hahaha
The indexing link works like a charm.. except while using multiple accounts. Yes, it is an edge case and would dismiss it normally but I start to get tangled with this because in my new gig they made a mail account for me, which I have to use for the project. So when copy/paste the link, it doesn't work because is by default grab my main account. I'm doing a work around on this by pasting the link on an incognito tab or opening it in another browser.
what do you mean when you said we are limited to 200 of these things during the collection group query limitations part, do you mean we can only create 200 collection groups at most?
On my website, it opens with all the items in the database being show. So would it be best to query the data base for the data the user wants and then re-import what that are filtering for, or to import the whole database when the website loads then filter it on a button click using javascript? Sorry if this is a dumb question, I'm new to web development and the whole thing is extremely confusing. Also, I'm using react and redux with firestore. Is this going to be efficient enough to build a website, or should I be using a different stack?
Ahh now I understand it 10:45. If we have this indexes for zip code, which is a string, then firebase puts in to the index table all zip codes side by side (groups them) and orders them by their doc_id, so that aaa is the first and xxx the last. But if we have some stuff like the avg_rating, and do > or
How about querying a single document. How does that work when separating between document snapshot Id and document id, it fails to find document because the passed id is document Id while it finds document snapshot id.
In my app, user can search by name, order by stock or price (asc/desc), filter by category, brand, color, size... timestamp in such case do i have to create 64 (subset of 6) composite indexing? for all the scenarios, where search can be include or not filter can be done or not, timestamp sorting will always be there other sorting can be done or not? its getting very frustrating to achieve this, better to use some other database.
I read that Firebase stores its offline data in SQLite. Is it possible to do a full text search against this local data or do I need to sync it to a secondary SQLite file to query against? Or is there a better way? The data set is about 100K varchar 100 in size and I need to be able to search "%STR1%" AND "%STR2%" #AskFirebase.
Wow, Indeed a great video!! Since there is no full text search supported as mentioned 6:30 isn't it a common use case for most apps, as in this case, the user may not type the restaurant name correctly all the time.Any simpler way of doing this other than hooking up a elastic search/Algolia?
A little bit late on this, but an "or" condition can now be accomplished using the "in" query operator, and specifying the potential alternatives in an array (although right now they limit it to 10 possibilities). From the docs: citiesRef.where('country', 'in', ['USA', 'Japan']); you can also use array-contains-any citiesRef.where('regions', 'array-contains-any', ['west_coast', 'east_coast']);
i keep wondering when this will have full text search and geo search otherwise you can scale with mongo and elastic and they work better but ive found also needings joins with mysql so you need many dbs for the task at hand and this aint it yet
Does anyone know if these querying algos and creating index for each field (even mapings) exists in mongodb? Or how different is cloud firestore from mongodb?
A collection query order by name for example, gives me something like the following: "A", "B", "C", "a"... which collation does it use? Can we make any change to get "A","a","B", "C"?
Thanks a lot I'm waiting for the episode about searching in text :) Apparently we can do it with algolia, is there a way to perform a search with synonims ?
In your older videos you made an example of how to structure events with attendees etc it would be very helpful if you could make one of those with Firestore!
Kinda sucks that I can't create index through some kind of call through firestore API. Then I could version control stuff and everything would be a little bit more organized and not scattered all over the place.
You can deploy your indexes with the Firebase command line interface. See for an example of this: codelabs.developers.google.com/codelabs/firestore-web/#9
Best firestore video so far. Really calls a spade for a spade, talks about what you can do, what will be developed and what you can’t do. And many examples. Perfect. I am so tired of videos where everything is just perfect and avoiding the elephant in the room.
YES, this so much!!!
so many realtime chat app guides pretending to have ANY useful features for real data usage.
The best tech evangelist of any tech company. This guy really knows his craft.
He really helps me calm down my anxiety to start a project.
@@vaguebrownfox lol, how was your project
Watching this in 2020 with the 2019 update added in.. this. This is quality content. I chose the right platform for my web app.
ikr! I'm seriously troubled by the fact that it says it was published May 2018... you can either edit UA-cam videos with some sorcery I don't know, or they have a perfectly nice roadmap way ahead in time... I don't know.
@@lesmo34 I mean, FireStore belongs to Google, UA-cam belongs to Google too. You know what I mean
@@HieuNguyen-vk7ix yeah. as of now, IIRC only Google can edit their own videos
@@HieuNguyen-vk7ix They should not do this tho its really dangerous, if suppose there's a really old video and someone describes newly found innovations in it the people who are the inventors of those innovations will have a hard time getting patents for those innovations.
In fact if the tech in this video is patented by them in 2019 they might as well get into trouble.
@Casuality videos edited in Creator Studio don't keep their original creation date ;)
Guys please make more such algorithmic videos explaining all the features in somewhat low level. This was simply amazing.
I don't think they are going to give their secrets away haha
I love how Todd makes seemingly complex ideas easy to understand. Bravo!
Todd is bloody amazing. The pacing, examples, emphasis, humour, enthusiasm, level of technical detail; he is the perfect software trainer.
hahaha, the time warps back to update the content is absolutely SUPERB! Bravo!!! *applauds*
Awesome video, probably the best i have seen on the topic, focuses on the Why and not the How, which is usually what gets overlooked in tutorials
Brief, but insightful, and a good bridge for the folks coming from a relational DB background. Structuring data to suit Firestore's query capabilities is the key takeaway here - that should be mentioned in the description. It's easy to miss it thinking "ah, I know how to query" - I know I nearly did.
This is great series. You are doing great job explaining basic behavior and are charismatic in the process which is rare in this kinda videos.
Playlists also sure help a lot. Keep up the good work :)
I'm smashed by the fact that Ray's Restaurant scored over 4.5 stars just selling Radishes. What a guy!
Seeing this video pop up on my alerts made my day. And actually watching it was just as much fun and just as informative as I expected it to be. So.... when's the next one coming??
Amazing explanations about what Firestore can and cannot do. Wish there were more resources like this.
Thanks, im starting to feel more confident about firestore as I watch.
he is so good at this and everything kind of makes sense now! thanks for the series!!
I continue to be so impressed by the documentation and resources available for Google Cloud Platform. I learned to code less than two years ago and now I am creating Cloud Run services to query our firestore database, developing small apps that read and write to BigQuery, and designing SLO's. GCP is the best. (Also, 2019 Todd had such a glow-up!)
I have been waiting too long for this episode. :(( This is a great video anyway
Had to go through variouse tutorials before understanding how I should make a propper query for Firebase, I think there might be a lack of examples in the docs and also in this video.
This teacher is VERY friendly!! thank you!! and now I go for vide #3 :)
Wow did they update the video? I understand it is posted in 2018 but in 2:11, todd mentioned/"joke" it is the year 2019
Lol I am just wondering the same, like was that in the original video or is it updated somehow xd
Great presentation of the occasionally head-spinning content that you have made easy to consume. kudos!!
How do you create a denormalized query output which can be populated from different nest collections ? Also can you also join results from different nested collections from different Firestore Projects ?
subtitle broken!
You guys should do a serie about Elasticsearch integration cause it seems a little frustrating not having this option til now. We need 'like' queries indeed.
Todd, you are amazing. Thank you for sharing your technical knowledge!
awesome
one more perfectly structured video!
top!!!
Hi Todd. This is the most enjoyable tutorial video I've ever seen 😂 Easy to understand and hilarious at the same time
Excellent content that makes it so fun to learn and makes me want to learn more about it!
One of the best content I've seen!
👏👏
The was super informative!! thanks! I am glad that there are more vids about the advanced features. You tend to miss them in the docs.
Watching in 2021 but no future guy from 2020 though. Great content. Amazingly intuitive.
How come the OR (||) operator doesn't work like stated in 8:03 but when using the "in" operator like where("someProp", "in", ["value1", "value2"]) works in firestore?
Hi Todd, may i ask how is the index/ document id created/name? 5:44
Please correct me if i am wrong, I believe that how indexing work is create individual tables for each field name e.g. address - 1 table and crusine - 1 table. 9:48
Within each table is the value and its location
Superb documentation Firebase team!
Subtitles are messed up from the 2019 update!
Great video. As querying a collection automatically generates an index, this raises a whole bunch of questions... How can we see what indexes are in use? Does a one-off query cause an index to be built and maintained for the lifetime of a collection? What is the storage cost penalty for each index? Can we remove an index? Does having more indexes slow down document write speed, or are indexes eventually consistent?
Wow, lots of great questions. I'll try to answer what I can quickly: 1) there is no way to see what indexes are used. But while it would be interesting to see the query plan, you can't affect it. No matter how you write the query, the indexes used will be the same. 2) If you don't need a composite index anymore, you can delete it from the console. 3) there is no charge for index storage. 4) yes, you can remove any composite index from the console 5) I haven't gathered any such performance metrics for this yet. I you get to them, I'd love to see the results.
Would be awesome to have similar video done for security rules :)
#askFirebase
on 9:30 - "select all restaurants where zip=94045 and ang_rating > 4.6"
why can't you binary search each index document id from the right side in the left side?
complexity would be O(r_rating * log(r_zip)), and since you considered log as a constant it would still be O(r)
I can't say that I fully understood the difference between an equality and inequality search, I got an idea, but I wouldn't be sure about what I would code.
If I start from the Restaurant in S. Francisco (iii), and then I Zig to the Japanese one with the same id (iii), and then the next Japanese one (ttt) which sends me back to the ones in S. Francisco (ttt), how can I be sure that I haven't skipped some in the S. Francisco list between iii and ttt? This would assume that the Japanese restaurants are also sorted by City, but with other fields and possibly changes happening is this really always true and reliable?
Did I just describe that it could be an "inequality" search where there's no certain relationship between the order of the two fields?
same question here
At 2:50 , when you say “ 200 of this things “ do you mean 200 Collection group queries or 200 Documents to search through per Collection group query or 200 results per Collection group query
Awesome. Please continue to go in depth on fire store.
Just a question, the composite index is a string and we are checking for a number comparison. is that a right example?
In Kotlin, how can I save a document that contains an enum and then read it back? I'm able to save, but reading it back crashes the app.
Great walk through, however, my dashboard brings up Datastore (not Firestore) where I can add "entities"; I want to use Firestore and create collections and docs. I have clicked on every dev and admin option and still end up in the same place. What went wrong??
Please more videos and Please explain more slower, feels like we are running from firestorm :)) And love all firebase videos... Thanks again...
We can no longer watch in 2x speed :(
Love you analogies and explanation style!
Excellent video. Entertaining, good pacing, explains the algorithms and the why and how. Learnt a lot in 15mins
really good information thank you
"the time it takes to run a query is proportional to the number of results, NOT the number of documents you're searching through"
MY LIFE IS A LIE. This goes against everything I thought I knew hahaha
More "Into the weeds" videos!
Agreed with the comments, this video taught me to fish instead of giving me a fish. I understand much better now
The indexing link works like a charm.. except while using multiple accounts. Yes, it is an edge case and would dismiss it normally but I start to get tangled with this because in my new gig they made a mail account for me, which I have to use for the project. So when copy/paste the link, it doesn't work because is by default grab my main account. I'm doing a work around on this by pasting the link on an incognito tab or opening it in another browser.
This is great! Can't wait for the pagination video
what do you mean when you said we are limited to 200 of these things during the collection group query limitations part, do you mean we can only create 200 collection groups at most?
There is a problem with subtitles from 2:02 :(
Awesome video! It will be great if there is a detailed video explaining the suggested way of doing "full text searching" in firestore.
On my website, it opens with all the items in the database being show. So would it be best to query the data base for the data the user wants and then re-import what that are filtering for, or to import the whole database when the website loads then filter it on a button click using javascript? Sorry if this is a dumb question, I'm new to web development and the whole thing is extremely confusing. Also, I'm using react and redux with firestore. Is this going to be efficient enough to build a website, or should I be using a different stack?
Thank you so much for this! Really great information.
You mentioned the max size of a document is 1mb. Does it include sub collection?
These videos are so entertaining
How order by a field which potentially not exist in firestore ? (Can we put a default value in this situation ?)
Nice! had been wondering about query efficiencies since a week and this explains it well!
9:30 - I don't understand why this ain't working but the example with San Franciso and Japanese is working at 8:40
Is the collection grp query feature alr in?
Ahh now I understand it 10:45.
If we have this indexes for zip code, which is a string, then firebase puts in to the index table all zip codes side by side (groups them) and orders them by their doc_id, so that aaa is the first and xxx the last.
But if we have some stuff like the avg_rating, and do > or
How about querying a single document. How does that work when separating between document snapshot Id and document id, it fails to find document because the passed id is document Id while it finds document snapshot id.
You are an excellent teacher
Thank you! Very helpful!
love your technical jargon. Googling Giant Pain in the .... right now
Does firebase indexes maps in array of maps?
According to the docs, you can do "OR" queries. At the time of this writing, the "OR" query is in "preview".
In my app, user can search by name, order by stock or price (asc/desc), filter by category, brand, color, size... timestamp
in such case do i have to create 64 (subset of 6) composite indexing? for all the scenarios, where search can be include or not filter can be done or not, timestamp sorting will always be there other sorting can be done or not?
its getting very frustrating to achieve this, better to use some other database.
so is this series outdated?
I read that Firebase stores its offline data in SQLite. Is it possible to do a full text search against this local data or do I need to sync it to a secondary SQLite file to query against? Or is there a better way? The data set is about 100K varchar 100 in size and I need to be able to search "%STR1%" AND "%STR2%" #AskFirebase.
Is there a way to request the document with the highest value, given a collection?
Wow, Indeed a great video!! Since there is no full text search supported as mentioned 6:30 isn't it a common use case for most apps, as in this case, the user may not type the restaurant name correctly all the time.Any simpler way of doing this other than hooking up a elastic search/Algolia?
When are the OR, IN, CONTAINS and other similar conditions going to be available? It really limits the usability of the platform.
A little bit late on this, but an "or" condition can now be accomplished using the "in" query operator, and specifying the potential alternatives in an array (although right now they limit it to 10 possibilities). From the docs:
citiesRef.where('country', 'in', ['USA', 'Japan']);
you can also use array-contains-any
citiesRef.where('regions', 'array-contains-any',
['west_coast', 'east_coast']);
How can we order the document by time
10:42 why it isn't possible to intersect these two?
Very nice video! Thank you guys!
thanks for telegram notification sound on 0:16
Is there any number of composite indexes limitation?
The transcript timing is messed up on this one after the TIME TRAVEL incident. Would appreciate if it is fixed.
Actually last three minute help a lottt
Overloaded.... I have to watch this multiple times.... still good video
So what is the solution for implementing foreign key as in SQL ?
LOVE THE UPDATE! thanks so much for that
i keep wondering when this will have full text search and geo search otherwise you can scale with mongo and elastic and they work better but ive found also needings joins with mysql so you need many dbs for the task at hand and this aint it yet
Does anyone know if these querying algos and creating index for each field (even mapings) exists in mongodb? Or how different is cloud firestore from mongodb?
A collection query order by name for example, gives me something like the following: "A", "B", "C", "a"... which collation does it use? Can we make any change to get "A","a","B", "C"?
Please more videos like this. More code too. Would love to see some stuff from scratch.
Thanks a lot
I'm waiting for the episode about searching in text :)
Apparently we can do it with algolia, is there a way to perform a search with synonims ?
Hi, Is this video still relevant or is it out of date as suggested it would be early in the video?
Update: != query on a single field is now supported since Sept 2020.
so exciting thanks
I don't know if Calico's venture is doing well but it seems that Google resurrected Robin Williams!
In your older videos you made an example of how to structure events with attendees etc it would be very helpful if you could make one of those with Firestore!
Pleeeaaassee ! Update the subtitles ! Vivek is right ! After the time traveller made an entry the subtitles got out of sync ! :(
excellent video
Kinda sucks that I can't create index through some kind of call through firestore API. Then I could version control stuff and everything would be a little bit more organized and not scattered all over the place.
You can deploy your indexes with the Firebase command line interface. See for an example of this: codelabs.developers.google.com/codelabs/firestore-web/#9
@@Frank_van_Puffelen ah nice, thank you!
how can you query timestamp? or date?
any help appreciated.