How to delete a search Index itself

旧街凉风 提交于 2019-12-12 08:39:18

问题


Search Index has a method to delete a document. https://developers.google.com/appengine/docs/python/search/indexclass (Python) https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/search/Index (java)

But how to delete Index itself?

Empty Index was listed at the Text Search Panel in the Admin Console.

but no button to delete.


回答1:


Since you have tagged gae-search I assume your question refers to an index of the Search API (i.e. full text search service, not NDB/HRD datastore index).

Currently you can only delete the documents in an index, but you can't delete the index itself, e.g. issue 8235 and 8490. This restriction of Search API applies to all languages supported in Google App Engine.

The vacuum_indexes prompts you only for indices in datastore, but I miss something like this for the search service too.




回答2:


When running a local dev environment with version 1.9.x (and possibly earlier), you can pass this argument to dev_appserver.py to simply clear ALL of them regardless of whether there are documents in them:

--clear_search_indexes [CLEAR_SEARCH_INDEXES]

It doesn't look like there's a way to clear an individual index yet though based on the issue statuses posted above by Ani.



来源:https://stackoverflow.com/questions/21470134/how-to-delete-a-search-index-itself

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!