Pravin
Pravin

Reputation: 6662

CouchDb startkey, endkey doesn't works together

I am querying a view by:
curl -vX GET 'http://root:[email protected]:5984/twitter_api_new/_design/tweet/_view/tweets_by_source?endkey=\["yoono","2011-10-09"\]&group=true&startkey=\["yoono", "2011-10-10"\]' This returns curl: (52) Empty reply from server

But if I remove either of startkey and endkey, then it returns results

Upvotes: 0

Views: 2038

Answers (2)

Pravin
Pravin

Reputation: 6662

`curl -vX GET 'http://root:[email protected]: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.

Upvotes: 1

Robert Newson
Robert Newson

Reputation: 4631

Try adding -g to your curl command. This disables curl's globbing.

curl -gv 'http://root:[email protected]:5984/twitter_api_new/_design/tweet/_view/tweets_by_source?endkey=["yoono","2011-10-09"]&group=true&startkey=["yoono", "2011-10-10"]'

Upvotes: 1

Related Questions