map() won't get mapping
Closed this issue · 3 comments
nverwer commented
The description op map() in line 706 says: Get or set mapping.
However, due to a small typo this does not work. Line 727 is:
return request(request.q ? 'PUT' : 'GET',
(request.p ? request.p + '/' : '') + '_mapping'
);
but that should be:
return request(request.b ? 'PUT' : 'GET',
(request.p ? request.p + '/' : '') + '_mapping'
);
(rotate 'q' 180 degrees so it becomes 'b').
mikepb commented
Thanks @nverwer ! The source docs for the method was also incorrect for putting a mapping.
I've pushed v0.4.0 to npm to fix these bugs :)
mikepb commented
Also pushed v0.4.1 to rename type.type
to type.name
to match online documentation and avoid a conflict with index.type()