Skip to content

Commit

Permalink
Shows how to exclude property from index (for docs) (#147)
Browse files Browse the repository at this point in the history
* Exclude property from index (doc)

* Excludes the description property
  • Loading branch information
WalterHub authored and jmdobry committed Jul 12, 2016
1 parent 76bea45 commit 8f5dc00
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions datastore/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,21 @@ function addTask (description, callback) {

datastore.save({
key: taskKey,
data: {
created: new Date().toJSON(),
description: description,
done: false
}
data: [
{
name: 'created',
value: new Date().toJSON()
},
{
name: 'description',
value: description,
excludeFromIndexes: true
},
{
name: 'done',
value: false
}
]
}, function (err) {
if (err) {
callback(err);
Expand Down

0 comments on commit 8f5dc00

Please sign in to comment.