Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

128
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda