Couchdb startkey and endkey does not work when using POST method -
when using method startkey , endkey, works fine , gives list of "datestamp" falls in startkey-endkey range:
but when use post method json payload, gives records has "datestamp" field regardless of value:
http://localhost:5984/reservations/_design/default/_view/by_datestamp
payload:
{"startkey":"1438704000004","endkey":"1438704000005"}
my view looks this:
{ "by_id": { "map": "function(doc) { if(doc.id) { emit(doc.id, doc); } }" }, "by_datestamp": { "map": "function(doc) { if(doc.datestamp) { emit(doc.datestamp, doc); } }" } }
according docs argument can send in post body keys
.
Comments
Post a Comment