[ 
https://issues.apache.org/jira/browse/COUCHDB-2988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15242983#comment-15242983
 ] 

ASF GitHub Bot commented on COUCHDB-2988:
-----------------------------------------

GitHub user nickva opened a pull request:

    https://github.com/apache/couchdb-couch/pull/162

    Implement Mango selectors for change feeds

    API is modeled after _doc_ids filter for change feeds.
    
    User POSTs to {db}/_changes with `filter=_selector`.
    Document body should have a "selector" field, with
    a Mango selector object as value.
    
    For example:
    ```
    http://.../d1/_changes?filter=_selector
    {
      "selector": {"z" : {"$gte" : 1} }
    }
    ```
    In case "selector" is missing or its value is not a
    JSON object, a 400 error is returned with a
    corresponding error message. For example:
    ```
    {
        "error": "bad_request",
        "reason": "Selector error: 42, expected an object"
    }
    ```
    
    In case "selector" object cannot be validated as a
    Mango selector, a 400 error is returned with a validation
    error as "reason".
    
    Jira: COUCHDB-2988

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-couch couchdb-2988

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/162.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #162
    
----
commit a703360b140ec610f65187818016522033709188
Author: Nick Vatamaniuc <[email protected]>
Date:   2016-04-14T21:29:00Z

    Implement Mango selectors for change feeds
    
    API is modeled after _doc_ids filter for change feeds.
    
    User POSTs to {db}/_changes with `filter=_selector`.
    Document body should have a "selector" field, with
    a Mango selector object as value.
    
    For example:
    ```
    http http://.../d1/_changes?filter=_selector
    {
      "selector": {"z" : {"$gte" : 1} }
    }
    
    In case "selector" is missing or its value is not a
    JSON object, a 400 error is returned with a
    corresponding error message. For example:
    ```
    {
        "error": "bad_request",
        "reason": "Selector error: 42, expected an object"
    }
    ```
    
    In case "selector" object cannot be validated as a
    Mango selector, a 400 error is returned with a validation
    error as "reason".
    
    Jira: COUCHDB-2988

----


> Allow query selector as changes and replication filter
> ------------------------------------------------------
>
>                 Key: COUCHDB-2988
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2988
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core, Mango
>            Reporter: Nick Vatamaniuc
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to