-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
Summary
Right now, everything is indexed by default (based on the Value
protobuf's indexed [default = true]
field). See https://github.com/GoogleCloudPlatform/google-cloud-datastore/blob/v1beta2-rev1-2.1.0/proto/datastore_v1.proto#L129
This will get crazy expensive. We need to allow people to specify whether a field should be indexed. We should probably also default this to false
. But that's a bigger question.
To do
- Decide whether to allow explicit indexing or unindexing
- Figure out what the syntax will be for specifying indexing
- Submit a patch for the feature
Options for specifying indexing
List of indexed fields
Unless a field is explicitly in the list of indexed fields, the indexed
property will be set to False
.
entity = ...
entity.indexed_fields = ['field1', 'field2']
List of unindexed fields
If a field is in this list, it's indexed
property will be set to False
. Otherwise it will be left unset (and therefore default to True
per the protobuf definition.
entity = ...
entity.unindexed_fields = ['field1', 'field2']
CC
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.