gsandf / rethinkdb-elasticsearch-stream

🔄 sync RethinkDB tables to Elasticsearch using changefeeds
9 stars 4 forks source link

#29 Adds delete functionality #30

Closed sunnyzanchi closed 6 years ago

sunnyzanchi commented 6 years ago

This is for #29. It exposes the _delete symbol so that users of the library can specify they want a document to be deleted from Elasticsearch without checking for some arbitrary string. In the transform function, they can return a document like

import { _delete } from 'rethinkdb-elasticsearch-stream';
...
transform: ({ document }) => ({
  ...document,
  _delete
})

This will send a DELETE request to Elasticsearch.

I also had to upgrade nock to 9.2.3, 9.0.14 was causing tests to fail.