Skip to content

Instantly share code, notes, and snippets.

@tannerlinsley
Created January 11, 2016 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tannerlinsley/34d6f3511efd2a74ec49 to your computer and use it in GitHub Desktop.
Save tannerlinsley/34d6f3511efd2a74ec49 to your computer and use it in GitHub Desktop.
db.index({
type: 'json',
index: {
fields: [
'userID',
'type',
'fromUserID',
'toUserID',
'didView',
'mediums'
]
}
}, function(err, response) {
if (err) {
throw err
}
})
db.index({
type: 'text',
index: {
fields: [{
"name": 'tags.[]',
"type": "string"
}]
}
}, function(err, response) {
if (err) {
throw err
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment