How to fix: DatastoreNeedIndexException: The index for this query is not ready to serve in Google App Engine

In the log of the admin panel of your app, you can find the suggestion of the index, such as:

   com.google.appengine.api.datastore.DatastoreNeedIndexException: The index for this query is not ready to serve. See the Datastore Indexes page in the Admin Console.
The suggested index for this query is:

  <datastore-index kind="Greeting" ancestor="true"
source="manual">
<property name="date" direction="desc" />
</datastore-index>

Put the suggest index to datastore-indexes.xml file located in your WEB-INF directory. The full xml file would look like:

<?xml version="1.0" encoding="utf-8"?>
<datastore-indexes autoGenerate="true">
<datastore-index kind="Greeting" ancestor="true"
source="manual">

<property name="date" direction="desc" />
</datastore-index>
</datastore-indexes>

Featured Post

NGINX Unit is dynamically configured using a REST API

There is no static configuration file. All configuration changes happen directly in memory. Configuration changes take effect without requir...