Closed LureOfAdventure closed 5 years ago
Have you indexed your database? The query may be failing because it's not queried... Once you execute get()
on the query you should do a catch
to see if it gives you a url to index your database.
If you're doing an onSnapshot
instead of get
the second callback would be your error handler.
@MichaelSolati Yeah my db is index. I am doing a get. I've attached more screenshots that can clarify things. I'm not getting back any errors either. Thank you for your prompt response!
Ok, so I missed something obvious when looking over your screenshots (my bad). Data queried by geofirestore needs to be maintained by geofirestore, and geofirestore stores all data associated with your object inside the d
property, not at the top level. It's an inconvenience, but a necessity at this time.
I do plan on changing how geofirestore works, but time constraints have prevented me from working on v4.0.0.
Ah okay gotcha! Any chance you might know when v4.0.0 will be out? :)
@MarkedWarrior Did you make this work?
@barakoles yeah I just restructured my data to be included under d and everything worked correctly
@MarkedWarrior Awesome, you used the same query and had to index the db as well right? BTW, what is this 'formater' you use that highlights the parameters you should use? thanks dude
@barakoles Yep, same query! Oh I use Webstorm with typescript installed
I have been itching to figure this out and I guess this issue is good place as any to note this for geofirestore users:
firebase.initializeApp(firebaseConfig).firestore()
.collection("planner")
.where("d.authorId", "in", [`${this.props.auth.uid}`])
Hey, thanks for an awesome library! I'm using Firebase Functions and testing it out the query on one of my Firestore triggers. it works great when I'm doing a simple 'near' query but as soon as I add a 'where' it returns 0. Below is a screenshot of my db and code. Any advice would be helpful.