Hello Firestore lovers !
I am trying to retrieve all documents that do not have a field set. Here my field is named "source".
- I can get the documents where "source" is equal "".
- I can also get the documents where "source" is null.
- But I can't find the way to get documents where source is not set at all in the document.
Sample python 3 working code using the google cloud python library :
from google.cloud import firestore
product_ref = "product"
db = firestore.Client()
doc_ref = db.collection(product_ref)
docs = doc_ref.where(u'source', u'==', None).get()
This works and returns all the document with source == null.
I have found very few lines on github on a IS_NAN operator but I have not been able to use it to get the documents where "source" field is missing.
Thank you !