CouchDb startkey, endkey doesn't works together
I am querying a view by:
curl -vX GET 'http://root:root@127.0.0.1:5984/twitter_api_new/_design/tweet/_view/tweets_by_source?endkey=\["yoono","2011-10-09"\]&group=true&startkey=\["y开发者_JS百科oono", "2011-10-10"\]'
This returns curl: (52) Empty reply from server
But if I remove either of startkey and endkey, then it returns results
Try adding -g to your curl command. This disables curl's globbing.
curl -gv 'http://root:root@127.0.0.1:5984/twitter_api_new/_design/tweet/_view/tweets_by_source?endkey=["yoono","2011-10-09"]&group=true&startkey=["yoono", "2011-10-10"]'
`curl -vX GET 'http://root:root@127.0.0.1:5984/twitter_api_new/_design/tweet/_view/tweets_by_source?endkey=\["yoono","2011-10-09"\]&group=true&startkey=\["yoono",**_**"2011-10-10"\]'
Just removed empty space from \["yoono",**_**"2011-10-10"\]'
array elements. _ was the space removed.
精彩评论