Thursday, February 11, 2010

Cleaning up Indexes in Google App Engine/Java

This is so peculiar I still can't decide if I should laugh or cry...

In short, if you use GAE Java SDK you can't delete indexes in your App Engine application.

To give you some context, indexes is GAE's only way of executing queries against the data store and a single query can use a maximum of 1 (one) index. For the things to be entertaining there is a free quota of 100 indexes per application. Before you know it the indexes quota goes in the red area on the dashboard and your next deployment fails.

At this point you realize a good deal of the indexes out there are not relevant any more and should be disposed of. You head to the dashboard and verify that it is the case indeed. You look for Delete button. For Remove button. For Purge button. For any button... No such luck. There are no buttons on Datastore Indexes page of GAE Dashboard.

Alright, you think. There must be a utility of some kind to get those darn indexes out of sight. And yes there sure is one! In GAE Python SDK...

This is the hilarious part. You program in Java and you use Python to "vacuum" your indexes. Isn't that intuitive?

This must be one of their April Fools jokes that slipped through the fingers. To remind the fine folks at Google we are not there yet star this issue.

0 comments: