@ibm-cloud/cloudant - v0.12.5
    Preparing search index...

    Class ReplicationDocument

    Schema for a replication document. Note that selector, doc_ids, and filter are incompatible with each other.

    This type supports additional properties of type any.

    Indexable

    • [propName: string]: any

      ReplicationDocument accepts additional properties of type any.

    Index

    Constructors

    Properties

    _attachments?: { [key: string]: CloudantV1.Attachment }

    Schema for a map of attachment name to attachment metadata.

    _conflicts?: string[]

    Schema for a list of document revision identifiers.

    _deleted?: boolean

    Deletion flag. Available if document was removed.

    _deleted_conflicts?: string[]

    Schema for a list of document revision identifiers.

    _id?: string

    Schema for a document ID.

    _local_seq?: string

    Document's update sequence in current database. Available if requested with local_seq=true query parameter.

    _rev?: string

    Schema for a document revision identifier.

    _revisions?: CloudantV1.Revisions

    Schema for list of revision information.

    Schema for a list of objects with information about local revisions and their status.

    cancel?: boolean

    Cancels the replication.

    checkpointInterval?: number

    Defines replication checkpoint interval in milliseconds.

    connectionTimeout?: number

    HTTP connection timeout per replication. Even for very fast/reliable networks it might need to be increased if a remote database is too busy.

    continuous?: boolean

    Configure the replication to be continuous.

    createTarget?: boolean

    Creates the target database. Requires administrator privileges on target server.

    Request parameters to use during target database creation.

    docIds?: string[]

    Schema for a list of document IDs.

    filter?: string

    The name of a filter function which is defined in a design document in the source database in {ddoc_id}/{filter} format. It determines which documents get replicated. Using the selector option provides performance benefits when compared with using the filter option. Use the selector option when possible.

    httpConnections?: number

    Maximum number of HTTP connections per replication.

    owner?: string

    The replication document owner. The server sets an appropriate value if the field is unset when writing a replication document. Only administrators can modify the value to an owner other than themselves.

    queryParams?: JsonObject

    Schema for a map of string key value pairs, such as query parameters.

    retriesPerRequest?: number

    Number of times a replication request is retried. The requests are retried with a doubling exponential backoff starting at 0.25 seconds, with a cap at 5 minutes.

    selector?: JsonObject

    JSON object describing criteria used to select documents. The selector specifies fields in the document, and provides an expression to evaluate with the field content or other data.

    The selector object must:

    • Be structured as valid JSON.
    • Contain a valid query expression.

    Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended option if filtering on document attributes only.

    Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for those fields. You can create more complex selector expressions by combining operators.

    Operators are identified by the use of a dollar sign $ prefix in the name field.

    There are two core types of operators in the selector syntax:

    • Combination operators: applied at the topmost level of selection. They are used to combine selectors. A combination operator takes a single argument. The argument is either another selector, or an array of selectors.
    • Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For instance, the basic $eq operator matches when the specified field contains a value that is equal to the supplied argument.

    It is important for query performance to use appropriate selectors:

    • Only equality operators such as $eq, $gt, $gte, $lt, and $lte (but not $ne) can be used as the basis of a query. You should include at least one of these in a selector.
    • Some operators such as $not, $or, $in, and $regex cannot be answered from an index. For query selectors use these operators in conjunction with equality operators or create and use a partial index to reduce the number of documents that will need to be scanned.

    See the Cloudant Docsfor a list of all available combination and conditional operators.

    For further reference see selector syntax.

    sinceSeq?: string

    Start the replication at a specific sequence value.

    socketOptions?: string

    Replication socket options.

    Schema for a replication source or target database.

    sourceProxy?: string

    Deprecated: This setting is forbidden in IBM Cloudant replication documents. This setting may be used with alternative replication mediators.

    Address of a (http or socks5 protocol) proxy server through which replication with the source database should occur.

    Schema for a replication source or target database.

    targetProxy?: string

    Deprecated: This setting is forbidden in IBM Cloudant replication documents. This setting may be used with alternative replication mediators.

    Address of a (http or socks5 protocol) proxy server through which replication with the target database should occur.

    useBulkGet?: boolean

    Specify whether to use _bulk_get for fetching documents from the source. If unset, the server configured default will be used.

    useCheckpoints?: boolean

    Specify if checkpoints should be saved during replication. Using checkpoints means a replication can be efficiently resumed.

    Schema for the user context of a session.

    winningRevsOnly?: boolean

    Replicate only the winning revisions. Replication with this mode discards conflicting revisions. Replication IDs and checkpoints generated by this mode are different to those generated by default, so it is possible to first replicate the winning revisions then later backfill remaining revisions with a regular replication job.

    workerBatchSize?: number

    Controls how many documents are processed. After each batch a checkpoint is written so this controls how frequently checkpointing occurs.

    workerProcesses?: number

    Controls how many separate processes will read from the changes manager and write to the target. A higher number can improve throughput.

    Methods