You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2019/09/05 18:01:00 UTC

[couchdb] branch remove-old-multiquery created (now 7e0cc21)

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a change to branch remove-old-multiquery
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 7e0cc21  Remove old multi-query path

This branch includes the following new commits:

     new 7e0cc21  Remove old multi-query path

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb] 01/01: Remove old multi-query path

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch remove-old-multiquery
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 7e0cc2163e9a00a617bef368b72d264e13417bca
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Thu Sep 5 13:57:12 2019 -0400

    Remove old multi-query path
    
    Users should send requests with multiple queries to the new endpoint:
    
    /db/_design/{ddoc}/_view/{view}/queries
    
    Closes #2168
---
 src/chttpd/src/chttpd_view.erl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/chttpd/src/chttpd_view.erl b/src/chttpd/src/chttpd_view.erl
index 26107d7..42c3afd 100644
--- a/src/chttpd/src/chttpd_view.erl
+++ b/src/chttpd/src/chttpd_view.erl
@@ -91,19 +91,19 @@ handle_view_req(#httpd{method='POST',
     Keys = couch_mrview_util:get_view_keys(Props),
     Queries = couch_mrview_util:get_view_queries(Props),
     case {Queries, Keys} of
-        {Queries, undefined} when is_list(Queries) ->
-            [couch_stats:increment_counter([couchdb, httpd, view_reads]) || _I <- Queries],
-            multi_query_view(Req, Db, DDoc, ViewName, Queries);
         {undefined, Keys} when is_list(Keys) ->
             couch_stats:increment_counter([couchdb, httpd, view_reads]),
             design_doc_view(Req, Db, DDoc, ViewName, Keys);
         {undefined, undefined} ->
             throw({
                 bad_request,
-                "POST body must contain `keys` or `queries` field"
+                "POST body must contain `keys` field"
             });
         {_, _} ->
-            throw({bad_request, "`keys` and `queries` are mutually exclusive"})
+            throw({
+                bad_request,
+                "The `queries` parameter is no longer supported at this endpoint"
+            })
     end;
 
 handle_view_req(Req, _Db, _DDoc) ->