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/03/12 09:32:07 UTC

[GitHub] AlexanderKaraberov commented on issue #1142: fabric:query_view/4 fails if number of docs in the DB is more than 60

AlexanderKaraberov commented on issue #1142: fabric:query_view/4 fails if number of docs in the DB is more than 60
URL: https://github.com/apache/couchdb/issues/1142#issuecomment-372245289
 
 
   Hi @davisp , 
   Thanks for the explanation! Regarding my use case (namely fine-grained filtering in `_changes` feed) I'm planning to implement an alternative implementation to avoid misuse of the ` rexi_util:recv`. Basically I want to call `fabric:query_view` only once in `chttpd_db:handle_changes_req` then store a response in the `ETS` table and then use it like this to do the actual filtering instead of `couch_query_servers:filter_view()`:
   ```erlang 
       Passes = case couch_util:get_value(row, lists:first(ets:lookup(Resp, ViewResp)), undefined) of
               undefined ->
                 lists:map(fun (_) -> false end, Docs);
               Object ->
                 lists:map(fun (_) -> true end, Docs)
               end,
       filter_revs(Passes, Docs);
   ```
   What is your opinion about this approach? Or maybe you may give a hint on how to implement this in  a better way?

----------------------------------------------------------------
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