What's happen when the indexed configuration file is changed?

13 views
Skip to first unread message

Sea

unread,
Feb 6, 2012, 12:48:44 AM2/6/12
to Google App Engine
What's happen in Google App Engine when there are many entities are
stored and the indexed Configuration file is changed?
If there is a field of an entity is indexed in earlier version , and
become unindexed in this version?
If there is a field of an entity is unindexed in earlier version, and
become indexed in this version?
Will GAE perform re-indexing for all persisted entities? If it is, How
long does it needed?

Bests,

Simon Knott

unread,
Feb 6, 2012, 6:59:04 AM2/6/12
to google-a...@googlegroups.com
Hi,

There are two types of indexes:
  • Per-property indexes - each property of an entity has an ascending/descending index which is written at the time of entity persistence.  If you change whether a property is indexed, then you must manually read and re-write the entity for the index state to be modified in the datastore.  I usually write a little task which reads and re-writes all entities of a specific type, which I can call if I change an entity's configuration.
  • Composite indexes - these are updated when the index configuration is modified, by uploading a new version of your application.  You do not need to re-write entities for these indexes to be updated.  It should be noted that a property must have a per-property index for it to be usable in a Composite index.
Hopefully that helps!

Cheers,
Simon

Simon Knott

unread,
Feb 6, 2012, 7:00:06 AM2/6/12
to google-a...@googlegroups.com
Hi,

Just realised that I missed off the answer to "how long will it take" - this depends entirely on how many entities you have. :)

Cheers,
Simon
Reply all
Reply to author
Forward
0 new messages