backbone-db-elasticsearch
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -27,11 +27,11 @@ var _ = require('lodash'); | ||
if (options.includeBody) { | ||
if (!_.isFunction(model.indexedValues)) { | ||
throw new Error('indexedValues function must be defined'); | ||
if (!_.isFunction(model.searchValues)) { | ||
throw new Error('searchValues function must be defined'); | ||
} | ||
if (options.update) { | ||
esData.body = { | ||
doc: model.indexedValues() | ||
doc: model.searchValues() | ||
}; | ||
} else { | ||
esData.body = model.indexedValues(); | ||
esData.body = model.searchValues(); | ||
} | ||
@@ -38,0 +38,0 @@ } |
{ | ||
"name": "backbone-db-elasticsearch", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Elasticsearch driver for backbone-db", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,3 @@ ## backbone-db-elasticsearch | ||
}, | ||
indexedValues: function() { | ||
searchValues: function() { | ||
return this.toJSON(); | ||
@@ -28,4 +28,4 @@ } | ||
### indexedValues | ||
indexedValues function should return Object containing keys & values to be indexed. | ||
### searchValues | ||
searchValues function should return Object containing keys & values to be indexed. | ||
@@ -32,0 +32,0 @@ |
@@ -24,3 +24,3 @@ var elasticsearch = require('elasticsearch'); | ||
}, | ||
indexedValues: function() { | ||
searchValues: function() { | ||
var json = this.toJSON(); | ||
@@ -27,0 +27,0 @@ return json; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19813