You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/05/22 12:09:42 UTC

[GitHub] eiri commented on a change in pull request #1336: Mango: implicit coverage for _id and _rev during index selection

eiri commented on a change in pull request #1336: Mango: implicit coverage for _id and _rev during index selection
URL: https://github.com/apache/couchdb/pull/1336#discussion_r189876059
 
 

 ##########
 File path: src/mango/src/mango_idx_view.erl
 ##########
 @@ -124,7 +124,13 @@ is_usable(Idx, Selector, SortFields) ->
     % we don't need to check the selector for these
     RequiredFields1 = ordsets:subtract(lists:usort(RequiredFields), lists:usort(SortFields)),
 
-    mango_selector:has_required_fields(Selector, RequiredFields1)
+    % _id and _rev are implicitly in every document so
+    % we don't need to check the selector for these either
+    RequiredFields2 = ordsets:subtract(
+        lists:usort(RequiredFields1), 
 
 Review comment:
   `RequiredFields1` just came out of `ordsets:subtract/2` up a line, it's an ordset itself, so you don't need `usort` it. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services