0
votes

We are using Google App Engine for our new app. We want to use Google’s Datastore we are trying to understand how Datastore indexes work.

We understood that there are a couple of limits on indexes. We are especially focusing on entity index limitations.

We have embedded property in one of our models ,

Main class

Contact
{
  @Indexed
  private String name;

  @Embedded
  @Indexed
  private CStatus cstatus;
}

Embedded class   

CStatus
{
   private Long start_time = 0L;

   public enum Status
   {
      ACTIVE, PAUSE, DELETED
   };

   private String status = null;
}

Assume that I saved an instance of Contact,

1.How many predefined indexes will be created for the Contact kind in total?

2.How many index entries will be created in total?

3.Is there any developers’ play ground available for Datastore? We have checked Datastore statistics but it's taking 24-48 hours to update the index entries list.

1

1 Answers

1
votes

According to your code, two simple indexes will be created; 1 for name and another for status.

You should note that indexes will also be created if some other place in the code you run a query that requires other indexes.

Another thing to take note of is that the 200-limit on indexes does not apply to indexes using one single attribute. It applies to composite indexes using multiple attributes.

As of yet there is no play ground that I know of unless you wanna create a dummy project and test your code on it. Otherwise you just have to play in your development environment until Google addresses that issue.