5

I thought that this was not possible and that you had to reload all the data if you added new indexes.

Is this supposed to happen?

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
A Ba
  • 275
  • 2
  • 10

1 Answers1

5

When Cloud Datastore builds a new index, it includes any existing entities that match the index, so there's no need to update your existing data.

If, however, you have inserted entities with unindexed properties and decide you want to define indexes on those properties, then you need to update each of those entities to mark the property as indexed.

Ed Davisson
  • 2,927
  • 11
  • 11
  • 1
    What if my entities consists of 5 properties, A,B,C,D and E and I make an index with A B and C. Then I realize that I also want an index with B D and E. Will this work without purging and re uploading the data? – A Ba Jul 11 '16 at 13:34
  • As long as you didn't exclude B, D, or E from indexing when the entities were originally written, then you won't need to explicitly update the entities. – Ed Davisson Jul 11 '16 at 17:35