Andrey Kiyanovsky
Andrey Kiyanovsky

Reputation: 113

CouchDB/PouchDB selector for deleted docs

I'm trying to use a selector in sync() from remote CouchDB to local PouchDB for filtering out deleted documents:

selector: {
  _deleted: {
    $ne: true
  }
}

It doesn't return any documents from sync. How can I sync only non-deleted docs using selector?

Upvotes: 4

Views: 774

Answers (1)

raja
raja

Reputation: 159

you can use $exists

selector: {
  _deleted: {
    $exists: false
  }
}

Upvotes: 5

Related Questions