Java 未创建GAE数据存储索引

Java 未创建GAE数据存储索引,java,google-app-engine,datastore,Java,Google App Engine,Datastore,我正在努力使用GAE留言簿演示应用程序。我没有做任何修改。我让它在本地运行,但当我部署它时,会出现以下错误: com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found. recommended index is: - kind: Greeting ancestor: yes properties: - name: date direction: desc T

我正在努力使用GAE留言簿演示应用程序。我没有做任何修改。我让它在本地运行,但当我部署它时,会出现以下错误:

com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found. recommended index is:
- kind: Greeting
  ancestor: yes
  properties:
  - name: date
    direction: desc

The suggested index for this query is:
    <datastore-index kind="Greeting" ancestor="true" source="manual">
        <property name="date" direction="desc"/>
    </datastore-index>
无论如何,当我在Datastore>index下检查时,googledeveloper控制台没有显示任何“复合”索引。我等待了30多分钟(并且没有数据,所以索引应该很快)

不确定它是否是一个复合索引,是否应该显示在这里,但应用程序缺少索引,我被卡住了

非常感谢您的帮助。

跑步: gcloud app deploy/Users/stephanhofmann/Projects/mvntestapp/target/mvntestapp-1.0-SNAPSHOT/index.yaml


在终端窗口中定义索引。

我在使用
mvn appengine:deploy
时遇到了同样的问题。然后我意识到我必须显式地使用
mvn-appengine:deployIndex
来生成索引。希望这能帮助别人。

我也有同样的问题。你找到解决办法了吗?同样的问题。有人有解决方案吗?我设法解决了这个问题,并在下面发布了我的解决方案。使用gradle:gradlew-appengineDeployIndex对我有效。谢谢是的,这对我有用,谢谢!此外,构建索引大约需要5分钟,尽管数据存储数据库中只有1条记录/实体。您可以通过在线web控制台查看it构建(索引)的状态。
<datastore-indexes>
  <!-- Used 1 time in query history -->
  <datastore-index kind="Greeting" ancestor="true">
    <property name="date" direction="desc" />
  </datastore-index>
</datastore-indexes>
...
[INFO] GCLOUD: Jan 02, 2017 8:01:14 PM com.google.apphosting.utils.config.IndexesXmlReader readConfigXml
[INFO] GCLOUD: INFO: Successfully processed /Users/stephanhofmann/Projects/mvntestapp/target/mvntestapp-1.0-SNAPSHOT/WEB-INF/datastore-indexes.xml
[INFO] GCLOUD: Jan 02, 2017 8:01:14 PM com.google.apphosting.utils.config.IndexesXmlReader readConfigXml
[INFO] GCLOUD: INFO: Successfully processed /Users/stephanhofmann/Projects/mvntestapp/target/mvntestapp-1.0-SNAPSHOT/WEB-INF/appengine-generated/datastore-indexes-auto.xml
...