How to delete index on App Engine for Java

At the time of this writing there is no function to delete (unused) your datastore indexes directly with the Java tool set. But there is a way around: the python SDK has a function called vacuum_indexes. This is how your can do it, step by step:

  1. Install the Google App Engine for Python SDK and follow the steps described for your operating system here: http://code.google.com/appengine/docs/python/gettingstarted/devenvironment.html
  2. After you installed python, and the GAE for Python SDK, setup a project in a tmp folder, that has the same name as your Java project with the tools from the SDK. Pay attention on capital letters. Your project must have EXACT the same name as the Java version
  3. [Optional] Deploy that to the app engine, but pay attention that you choose a version differently from all versions used by your java environment. You will be asked for your email and password
  4. On the command line execute appcfg.py vacuum_indexes pathToYourProject/
  5. Then you have to decide which index you want to delete. Be careful. Deleting the wrong index can render your app temporarily unusable…
Posted by Daniel Eichhorn

Daniel Eichhorn is a software engineer and an enthusiastic maker. He loves working on projects related to the Internet of Things, electronics, and embedded software. He owns two 3D printers: a Creality Ender 3 V2 and an Elegoo Mars 3. In 2018, he co-founded ThingPulse along with Marcel Stör. Together, they develop IoT hardware and distribute it to various locations around the world.

Leave a Reply