跳至内容
Python 俱乐部
用户工具
登录
站点工具
搜索
工具
显示页面
修订记录
反向链接
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
您的足迹:
google:gae:index-error
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== GAE索引出错解决方法:no matching index found. This query needs this index ====== Google AppEngine is really cool. You can host your app in few steps, easy to setup, free, and allows you to develop web applications using Python, Django and Google Datastore. I’ve played a while with AppEngine, helping another projects, setting up my stuff there and got lots of tricks to help another users. Today (March 31, 2009) I faced a small problem, related to index. I was executing a query on my website, and got an error: no matching index found. This query needs this index - kind: Comments properties: – name: page – name: data_issued direction: desc. What went wrong ? Appengine tries to make everything for you, but depending on the way you execute the Gql, you need to edit index.yaml adding some information to make it work. The query which I was executing is something like: db.GqlQuery(“SELECT * from Comments where page=:1 order by date_issued”). Since I don’t have any index which matches with the filter page=something, order by date, it gives me an error. To fix, just edit index.yaml, adding: <code> - kind: Comments properties: - name: page - name: data_issued direction: desc </code> After that, resync the index, using: <code> appcfg.py update_indexes . </code> Now you’ll be able to run your query ===== 参考 ===== http://rlabs.wordpress.com/2009/04/01/fixing-appengine-error-no-matching-index-found-this-query-needs-this-index/
google/gae/index-error.txt
· 最后更改: 2011/03/16 10:00 (外部编辑)
页面工具
显示页面
修订记录
反向链接
回到顶部