google-app-enginegogae-search

How to delete a search index on the App Engine using Go?


I am wondering what is the best way to delete a search index of the full text search API that is available on the Google App Engine. I have found a few questions on this topic focusing on Python, but none on Go. The general suggestions seems to be to manually delete all documents in the search index and than call index.delete_schema(), see for example[0].

However, for Go there seems to be no function to delete a schema. I have used a task queue to remove every document in an index, but the size of the index shown in the App Engine Dashboard did not decrease.

[0] How to delete or reset a search index in Appengine


Solution

  • When you delete documents, the space usage shown on the Dashboard is not updated immediately. It is recalculated by a nightly batch job. So it should be updated within 24 hours.