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
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
@proppy @aliafshar
Summary
Right now, everything is indexed by default (based on the
Valueprotobuf'sindexed [default = true]field). See https://github.com/GoogleCloudPlatform/google-cloud-datastore/blob/v1beta2-rev1-2.1.0/proto/datastore_v1.proto#L129This 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
Options for specifying indexing
List of indexed fields
Unless a field is explicitly in the list of indexed fields, the
indexedproperty will be set toFalse.List of unindexed fields
If a field is in this list, it's
indexedproperty will be set toFalse. Otherwise it will be left unset (and therefore default toTrueper the protobuf definition.CC
@proppy @aliafshar