python Firestore OrderBy和冲突的位置

python Firestore OrderBy和冲突的位置,python,google-cloud-firestore,Python,Google Cloud Firestore,当我创建索引时,它为什么不起作用order\u by('last\u time')是按升序排列的,所以您需要为last\u time创建升序索引: docs = db.collection(u'scylla').where('status', '==', 0).order_by('last_time').limit(10).stream() for doc in docs: print(doc.id, doc.get('last_time')) 请显示相关代码并说明确切的问题或错误。

当我创建索引时,它为什么不起作用
order\u by('last\u time')
是按升序排列的,所以您需要为
last\u time
创建升序索引:

docs = db.collection(u'scylla').where('status', '==', 0).order_by('last_time').limit(10).stream()
for doc in docs:
    print(doc.id, doc.get('last_time'))


请显示相关代码并说明确切的问题或错误。终端错误信息不足。另见。我不清楚您的问题是在单击提供的链接创建索引后发生的,还是手动创建索引。
scylla    status: ASC    last_time:ASC