Open
Description
Is your feature request related to a problem? Please describe.
There is no way to get/set which fields of an entity are indexed after initial entity creation.
Use case:
- Retrieve an entity
- Add a new field to the entity
- Exclude the new field from being indexed
Unlike the other client libraries, there is no way to achieve this with Node JS.
Describe the solution you'd like
Here's example code from the PHP Datastore library which easily enables this use case:
$ds = Datastore::get();
$entity = $ds->lookup($ds->key(...));
$entity["newField"] = 123;
$unindexedFields = $entity->excludedProperties(); // Get the unindexed fields.
$unindexedFields[] = "newField"; // Prevent the new field from being indexed.
$entity->setExcludeFromIndexes($unindexedFields);
$ds->update($entity);
Describe alternatives you've considered
Without this functionality, we cannot use Node JS or this library for our project.
Additional context
Related requests from other customers:
#914
#935