So How Do You Convince Google App Engine to Create Your Datastore Indexes
Creating indexes on Google App Engine / Java (gae/j) is an easy job. You don’t even have to think about it (well, for some time)
For etohum admin application we used gae/j and it has been almost two years and gae/j has been improved a lot, but still, it has some really annoying features (bugs — I am not sure how to named them).
This time, it is the Datastore Indexes. Some of the pages requires indexes like
![]()
which turns out to be confusing for the auto generation tool. If, let’s say, you change the order of the last two fields,
like this
![]()
you will not get it automatically.
Even if you explicitly define it in your datastore-indexes.xml file
<datastore-index kind="Application" ancestor="false" source="manual"> <property name="applciationIsFinished" direction="asc"/> <property name="isSpam" direction="asc"/> <property name="sezonId" direction="asc"/> <property name="bitisTarihi" direction="desc"/> <property name="basvuruTarihi" direction="desc"/> </datastore-index>
And the workaround for the problem is stated in the last paragraph of Using Automatic Index Configuration documentation
It’s a good idea to occasionally move index configuration from
datastore-indexes-auto.xmltodatastore-indexes.xml, then disable automatic index configuration and test your app in the development server. This makes it easy to maintain indexes without having to manage two files, and ensures that your testing will reproduce errors caused by missing index configuration.
So change the datastore-indexes.xml file and add manually the all required indexes and upload the application.
<datastore-indexes autoGenerate="false">
You can change it back to auto generate after make sure the desired indexes are created.
ps. A tip about gae/j is that it is considerable faster when it is 4AM-7AM at the west coast of North America.





