我正在尝试查询所有DocumentID以我的字符串开头的文档。我的研究告诉我,可以在where()中使用'
之所以这样做,是因为我的表包含Geohashes作为具有数据的DocumentID(高精度),并且我希望基于低精度Geohash来获取这些文档。
我还发现这是一个潜在的解决方案:
docs = mycolRef.where(firebase.firestore.FieldPath.documentId(),'>',somestring).stream();
但是,这会产生错误:“ NameError:未定义名称'firebase'”
我正在按照本指南中的说明通过google.cloud导入firestore:(https://cloud.google.com/firestore/docs/quickstart-servers)
from firebase import firestore
或import firebase
导致错误。