GAE for Java 版現(xiàn)在還不是非常完善,至少目前 appcfg 還沒有刪除已建索引的命令。 查了一下郵件列表,早在去年就有人問“GAE for 如何刪除已建索引”。
現(xiàn)在這個問題依舊存在,權(quán)宜之計是使用 Python SDK 的 appcfg vacuum_indexes 命令進(jìn)行刪除。
步驟:
To remove your indexes from your java app using the python SDK
1) download the python sdk (下載 Python SDK)
2) in your java project create a app.yaml file with the following
contents (在項目根目錄創(chuàng)建 app.yaml 文件,內(nèi)容如下)application: YOURJAVA_APPID (改為你的應(yīng)用標(biāo)識)
version: 1
runtime: python
api_version: 1handlers:
- url: .*
script: main.py3) from within your java app directory run (assuming appcfg.py is in
your path) (在應(yīng)用根目錄下執(zhí)行如下命令)
appcfg.py vacuum_indexes .4) follow the prompts to remove each index. (根據(jù)提示進(jìn)行索引刪除)
5) delete the app.yaml file (刪除 app.yaml)
6) star the issue here http://code.google.com/p/googleappengine/issues/detail?id=1893 (在GAE 開發(fā)項目中關(guān)注該問題)
這樣一來,基本是解決問題了。希望 GAE for Java 早日修復(fù)這個問題。
本文是使用 B3log Solo 從 簡約設(shè)計の藝術(shù) 進(jìn)行同步發(fā)布的。