Can't have _id=0
gabegorelick opened this issue · comments
Gabe Gorelick commented
utils.pathAppend
doesn't work if resource === 0:
exports.pathAppend = function (resource) {
'use strict';
if (resource) {
return '/' + resource;
}
return '';
};
This means operations on documents with _id=0 will instead operate on the entire type. For example, this:
es.delete({_index: 'foo', _type: 'bar', _id: 0}, ...)
ignores the _id and issues DELETE /foo/bar
.