In the above configuration file the direction property is optional and if you don’t specify it it will take it as ascending(asc) by default. So for use cases the following index configuration file should work well. You wanted to filter the data based on a specific time period in combination with one or more attributes. For that you need to define an index configuration file and deploy that as mentioned above. So you have to use composite or manual index. To build a composite index one needs to configure an index.yaml file and then create it by running the following command - gcloud datastore indexes create ~/path/to/index.yaml/fileĪs you want to filter the data based on more than two properties you can not use built-in indexes. Composite indexes are needed for complex queries which involves filtering the data using two or more properties. These built-in indexes are single property indexes and are suitable for simple queries.Ĭomposite indexes are manual indexes which are built by the user and not by Cloud Datastore automatically. These are the indexes that Cloud Datastore automatically creates for each property of each entity kind. Cloud Datastore provides two types of indexes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |