0

my data is structured like this:

appointments
  -city
    - store
      -month
        -day
          ....docs

i want to query the database to search within all appointments. how do i do that?

i've tried searching firebase docs, and i didn't find any solution. its mind boggling to me that getDocs(collection(db,'appointments')) is written under the hood in way that gives me 0 documents(to be clear he does not have any docs inside him. he has a subCollection that subCollection, there are documents)

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • I did a web search for "stack overflow firestore get all documents in subcollection v9" to find solutions. – Doug Stevenson Apr 11 '23 at 18:32
  • It sounds like you have not created any documents in the `appointments` collection, which means that `getDocs(collection(db,'appointments'))` correctly returns no results. If you want to be able to load all appointments from `appointments`, you wll have to create documents in there - not just a subcollection under it. – Frank van Puffelen Apr 11 '23 at 18:32

0 Answers0