garrensmith commented on a change in pull request #2958:
URL: https://github.com/apache/couchdb/pull/2958#discussion_r443431868



##########
File path: src/dreyfus/src/dreyfus_httpd.erl
##########
@@ -31,11 +31,14 @@ handle_search_req(#httpd{method=Method, path_parts=[_, _, 
_, _, IndexName]}=Req
   when Method == 'GET'; Method == 'POST' ->
     DbName = couch_db:name(Db),
     Start = os:timestamp(),
-    QueryArgs = #index_query_args{
+    RawQueryArgs = #index_query_args{
         include_docs = IncludeDocs,
         grouping = Grouping
     } = parse_index_params(Req, Db),
-    validate_search_restrictions(Db, DDoc, QueryArgs),
+    validate_search_restrictions(Db, DDoc, RawQueryArgs),
+    QueryArgs = RawQueryArgs#index_query_args{
+        drilldown= 
unwrap_list_of_list_of_lists(RawQueryArgs#index_query_args.drilldown)

Review comment:
       You are missing a space after `drilldown`

##########
File path: src/dreyfus/src/dreyfus_httpd.erl
##########
@@ -31,11 +31,14 @@ handle_search_req(#httpd{method=Method, path_parts=[_, _, 
_, _, IndexName]}=Req
   when Method == 'GET'; Method == 'POST' ->
     DbName = couch_db:name(Db),
     Start = os:timestamp(),
-    QueryArgs = #index_query_args{
+    RawQueryArgs = #index_query_args{

Review comment:
       Rather make this `QueryArgs0`
   
   And then later make it `QueryArgs1`

##########
File path: src/dreyfus/src/dreyfus_httpd.erl
##########
@@ -209,6 +212,16 @@ parse_index_params(IndexParams, Db) ->
         validate_index_query(K, V, Args2)
     end, Args, IndexParams).
 
+unwrap_list_of_list_of_lists([Inner]=Outer) when is_list(Inner) ->

Review comment:
       Can you rename this to what its actually doing and leave a comment 
explaining the list of lists of lists thing with drilldowns.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to