Firestore 要求我创建已存在的索引

Dmi*_*hin 4 flutter google-cloud-firestore

我正在尝试对评论进行分页。前 10 条评论加载正常,但接下来的(当查询包含时startAfterDocument)返回错误,如:

Query(comments where movie_id == 1041047 order by -created, __name__) failed: Status{code=FAILED_PRECONDITION, description=The query requires an index. You can create it here: https://console.firebase.google.com/project/.......
Run Code Online (Sandbox Code Playgroud)

但是这个索引已经存在,我之前创建了它。如果我按照建议链接 Firebase 控制台告诉我同样的信息:这个索引是存在的。

Query(comments where movie_id == 1041047 order by -created, __name__) failed: Status{code=FAILED_PRECONDITION, description=The query requires an index. You can create it here: https://console.firebase.google.com/project/.......
Run Code Online (Sandbox Code Playgroud)

这里有什么问题?

Gas*_*lén 14

如果您最近删除了索引,则需要稍等片刻,直到它从您的项目中删除,之后您才能再次创建它。

  • 等了15分钟后就为我工作了, (2认同)