Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

127
Views
CouchDB replication using a selector

Trying to create CouchDB replication using a selector [1]: https://i.stack.imgur.com/d3XzH.png but the request returns an error "unknown builtin filter name".

Request URL is 'https://example.com/schemes/_changes?timeout=25000&style=all_docs&filter=_selector%2F_selector&since=0&limit=4'

Why is the selector duplicated (_selector%2F_selector) in the request?

public startReplication = async (): Promise<void> => {
this.database.sync(null, {
  pull: {
    live: true,
    retry: true,
    filter: undefined,
    selector: {
      selector: {
        author: '456w346456',
      },
      sort: ['modified', 'asc'],
      fields: ['firstField', 'secondField']
    },
    batch_size: 4
  },
  push: {
    live: true,
    retry: true,
  },
});

};

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You probably want something like:

public startReplication = async (): Promise<void> => {
this.database.sync(null, {
  pull: {
    live: true,
    retry: true,
    filter: undefined,
    selector: {
      author: '456w346456',
    },
    batch_size: 4
  },
  push: {
    live: true,
    retry: true,
  },
});

The selector should just be an object describing the query that is to be applied to each change in the changes feed. In your example, you have a nested selector object within the selector.

Also your sort and fields keys are irrelevant here: it's not like the querying mechanism - you can't specify the sort order or which fields are to be returned.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!