Cleaning indexes in Google Datastore

0

I have an application in

asked by Max Sandoval 14.06.2016 в 06:39
source

3 answers

2

A very simple and valid option is to use gcloud .

  

gcloud preview datastore cleanup-indexes ~ / app / index.yaml

cleanup-indexes

You can also quickly rebuild by this means, create-indexes

    
answered by 02.09.2016 в 16:30
2

First you must remove the indexes that you do not need from your xml file.

important : If you do not know if an index is used, do not remove it. It is not possible to reverse this operation.

You need to use the vacuum-indexes command.

For xml , you can use appcfg.sh vacuum_indexes <el-directorio-de-tu-aplicación> or if you use Maven you can use maven mvn:vacuum_indexes .

For more information, I recommend reading cleanup-indexes . (This command is only for yaml , but the concepts are similar).

    
answered by 14.06.2016 в 18:03
1

These indexes are defined from manual way . If you did not create this file, it was probably created from automatically, running queries in the development environment.

The automatic file is in WEB-INF/appengine-generated/datastore-indexes-auto.xml , but you should find the definitive file in WEB-INF/datastore-indexes.xml , the latter is the one that you should clean so that the indexes in the server are removed.

    
answered by 27.07.2016 в 01:30