-
Notifications
You must be signed in to change notification settings - Fork 653
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
Seems that excluding a top level property doesn't exclude an embedded entities properties from being indexed - on top of that, I don't believe there's a way to exclude an embedded entities individual properties, that would solve my problem too.
Steps to reproduce
Just use this script (I'm running the datastore emulator)
const Datastore = require('@google-cloud/datastore');
const datastore = new Datastore({ projectId: 'datastore-test' });
datastore.insert({
key: datastore.key('User'),
data: [
{
name: 'description',
value: {
text: Buffer.alloc(1501, 'a').toString(),
},
excludeFromIndexes: true
}
]
}, (err, result) => {
if (err) {
console.error(err);
} else {
console.log(result.data);
}
});I'd expect there to be no error - the embedded entity ({ text: '...' }) shouldn't be indexed I believe? But it throw an error saying:
Error: The value of property "text" is longer than 1500 bytes.
Environment
- OS: OS X Sierra
- Node.js: v6.7.0
- npm: 3.10.3
- @google-cloud/datastore: v0.6.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.