willholley commented on a change in pull request #808: Add selector support for 
json indexes
URL: https://github.com/apache/couchdb/pull/808#discussion_r138416296
 
 

 ##########
 File path: src/mango/src/mango_native_proc.erl
 ##########
 @@ -150,6 +148,22 @@ get_index_entries({IdxProps}, Doc) ->
     end.
 
 
+get_index_values(Fields, Selector, Doc) ->
+    lists:map(fun({Field, _Dir}) ->
+        case mango_doc:get_field(Doc, Field) of
+            not_found -> 
+                not_found;
+            bad_path -> 
+                not_found;
+            Value -> 
+                case should_index(Selector, Doc) of
 
 Review comment:
   this looks like it could be more efficient - we only need to check whether 
the doc should be indexed once and, if not, return immediately.
 
----------------------------------------------------------------
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