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:

http://localhost:5984/reservations/_design/default/_view/by_datestamp?startkey=1438704000002&endkey=1438704000005

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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -