willholley commented on a change in pull request #866: Fix incorrect index 
selection when sort specified
URL: https://github.com/apache/couchdb/pull/866#discussion_r143989596
 
 

 ##########
 File path: src/mango/src/mango_idx.erl
 ##########
 @@ -93,17 +109,31 @@ recover(Db) ->
     end, DDocs)}.
 
 
-for_sort(Indexes, Opts) ->
-    % If a sort was specified we have to find an index that
-    % can satisfy the request.
+has_use_index(Opts) ->
+    case lists:keyfind(sort, 1, Opts) of
+        {use_index, _} ->
 
 Review comment:
   There is a test but this situation is handled elsewhere. I'll remove 
`has_use_index` and its usage.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to