Google App Engine查询时出现异常:
解决方案:在项目的war/WEB-INF/目录中手动创建datastore-indexes.xml文件,在其中进行手动的索引配置,通常只要将以上异常中自动生成的提示索引拷贝到该文件中,然后重新部署项目即可。
索引的生效时间会稍微慢一些,可能需要几分钟时间。一个正常工作的索引的状态应该为Serving,见附件图示。
索引配置详见:
[url=http://code.google.com/intl/zh-CN/appengine/docs/java/config/indexconfig.html]http://code.google.com/intl/zh-CN/appengine/docs/java/config/indexconfig.html[/url]
或[url=http://code.google.com/intl/zh-CN/appengine/docs/python/config/indexconfig.html]http://code.google.com/intl/zh-CN/appengine/docs/python/config/indexconfig.html[/url]
com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found..解决方案:在项目的war/WEB-INF/目录中手动创建datastore-indexes.xml文件,在其中进行手动的索引配置,通常只要将以上异常中自动生成的提示索引拷贝到该文件中,然后重新部署项目即可。
索引的生效时间会稍微慢一些,可能需要几分钟时间。一个正常工作的索引的状态应该为Serving,见附件图示。
索引配置详见:
[url=http://code.google.com/intl/zh-CN/appengine/docs/java/config/indexconfig.html]http://code.google.com/intl/zh-CN/appengine/docs/java/config/indexconfig.html[/url]
或[url=http://code.google.com/intl/zh-CN/appengine/docs/python/config/indexconfig.html]http://code.google.com/intl/zh-CN/appengine/docs/python/config/indexconfig.html[/url]
本文介绍了解决Google App Engine在查询时出现的DatastoreNeedIndexException异常的方法。通过手动创建并配置datastore-indexes.xml文件来解决索引问题,确保应用能够正确运行。
6万+

被折叠的 条评论
为什么被折叠?



