Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- < PUT /testqueryingviews/ HTTP/1.1<
- < Host: localhost<
- < Content-Type: application/json<
- < Accept: application/json<
- <
- > HTTP/1.1 201 Created
- > X-Couch-Request-ID: fb612d29
- > Server: CouchDB/1.1.1 (Erlang OTP/R14B04)
- > Location: http://localhost/testqueryingviews
- > Date: Tue, 05 Feb 2013 11:48:24 GMT
- > Content-Type: application/json
- > Content-Length: 12
- > Cache-Control: must-revalidate
- >
- > {"ok":true}
- < PUT /testqueryingviews/_design/feat HTTP/1.1<
- < Host: localhost<
- < Content-Type: application/json<
- < Content-Length: 592<
- < Accept: application/json<
- <
- < {"_id": "_design/feat", ".type": "design", "filters": {}, "language": "python", "views": {"some_view": {"map": "def map(doc):\n if doc['.type'] == 'dummy':\n field = doc.get('field', None)\n yield field, {\"value\": doc.get(VALUE_FIELD, None),\n \"field\": field}\nVALUE_FIELD = 'value'", "reduce": "def reduce(keys, values):\n value = 0\n for row in values:\n value += row['value']\n return value"}, "counting_view": {"map": "def map(doc):\n if doc['.type'] == 'dummy':\n yield doc.get('field', None), 1", "reduce": "_count"}}}> HTTP/1.1 201 Created
- > X-Couch-Request-ID: 03165a69
- > Server: CouchDB/1.1.1 (Erlang OTP/R14B04)
- > Location: http://localhost/testqueryingviews/_design/feat
- > Etag: "1-4eb961d574280e3146f6d7075d7b889d"
- > Date: Tue, 05 Feb 2013 11:48:25 GMT
- > Content-Type: application/json
- > Content-Length: 75
- > Cache-Control: must-revalidate
- >
- > {"ok":true,"id":"_design/feat","rev":"1-4eb961d574280e3146f6d7075d7b889d"}
- < GET /testqueryingviews/_design/feat/_view/some_view?reduce=false HTTP/1.1<
- < Host: localhost<
- < Accept: application/json<
- <
- > HTTP/1.1 500 Internal Server Error
- > X-Couch-Request-ID: 0635d75f
- > Server: CouchDB/1.1.1 (Erlang OTP/R14B04)
- > Date: Tue, 05 Feb 2013 11:48:25 GMT
- > Content-Type: application/json
- > Content-Length: 53
- > Cache-Control: must-revalidate
- >
- > {"error":"unknown_query_language","reason":"python"}
- HTTP/1.1 500 Internal Server Error
- X-Couch-Request-ID: 0635d75f
- Server: CouchDB/1.1.1 (Erlang OTP/R14B04)
- Date: Tue, 05 Feb 2013 11:48:25 GMT
- Content-Type: application/json
- Content-Length: 170
- Cache-Control: must-revalidate
- {"error":"function_clause","reason":null,"stack":["chttpd:end_delayed_json_response/1","chttpd:handle_request/1","mochiweb_http:headers/5","proc_lib:init_p_do_apply/3"]}
- > HTTP/1.1 500 Internal Server Error
Add Comment
Please, Sign In to add comment