GitHub user nickva opened a pull request:

    https://github.com/apache/couchdb-couch-replicator/pull/36

    Implement Mango selectors for replication

    Replication document should have a "selector"
    field with a Mango selector JSON object
    as the value.
    
    Example:
    ```
    {
        "_id": "r",
        "continuous": true,
        "selector": {
            "_id": {
                "$gte": "d2"
            }
        },
        "source": "http://adm:pass@localhost:15984/a";,
        "target": "http://adm:pass@localhost:15984/b";
    }
    ```
    
    This feature underneath uses the _changes feed
    Mango selectors capability.
    
    Replicator docs js validation function has been
    updated to return an error if it notices user has
    specified both `doc_ids` and `selector`. Or
    they specified `filter` and either of the other
    two.
    
    Replication options parsing also checks for those
    mutually exclusive fields, as replications can be
    started from the `_replicate` endpoint not just
    via the docs in `*_replicator` dbs.
    
    When generating a replication id, Mango selector
    object is normalized and sorted (JSON fields
    are sorted inside objects only). That is done in order
    to reduce the chance of creating two different
    replication checkpoints for same Mango selector.
    
    Jira: COUCHDB-2988

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

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

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

    https://github.com/apache/couchdb-couch-replicator/pull/36.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 #36
    
----
commit 46be859d8b6f7638ce67130878a3bb5c1a1644b4
Author: Nick Vatamaniuc <[email protected]>
Date:   2016-04-15T22:04:17Z

    Implement Mango selectors for replication
    
    Replication document should have a "selector"
    field with a Mango selector JSON object
    as the value.
    
    Example:
    ```
    {
        "_id": "r",
        "continuous": true,
        "selector": {
            "_id": {
                "$gte": "d2"
            }
        },
        "source": "http://adm:pass@localhost:15984/a";,
        "target": "http://adm:pass@localhost:15984/b";
    }
    ```
    
    This feature underneath uses the _changes feed
    Mango selectors capability.
    
    Replicator docs js validation function has been
    updated to return an error if it notices user has
    specified both `doc_ids` and `selector`. Or
    they specified `filter` and either of the other
    two.
    
    Replication options parsing also checks for those
    mutually exclusive fields, as replications can be
    started from the `_replicate` endpoint not just
    via the docs in `*_replicator` dbs.
    
    When generating a replication id, Mango selector
    object is normalized and sorted (JSON fields
    are sorted inside objects only). That is done in order
    to reduce the chance of creating two different
    replication checkpoints for same Mango selector.
    
    Jira: COUCHDB-2988

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to