Skip to content

Conversation

dadoonet
Copy link
Contributor

When couchDB river reads _changes API, _changes always returns attachments for each document.

Here is a simple patch to help users to disable this default feature.

It adds a new option to the couchDb river called : ignore_attachments :

  • false (default) : attachments will be pushed into Elastic Search
  • true : attachments will be ignored when pushing to Elastic Search

You can use it as follows :

{
  "type":"couchdb",
  "couchdb": {
    "host":"localhost",
    "port":"5984",
    "db":"mytest",
    "ignore_attachments":true
  }
}

BTW, I added a small test case.

Any comments are welcomed.

I will add a pull request to update the couchDb river guide to describe this new option also.

@dadoonet
Copy link
Contributor Author

Here is the documentation pull request : https://github.com/elasticsearch/elasticsearch.github.com/pull/72

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the setting name to ignore_attachments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. It's done.

doesn't make sense on server side but only on client side.
BTW, we may like to fully support attachments in ES couchDB river as by
now only meta information are sent to Elastic Search
@kimchy
Copy link
Member

kimchy commented Aug 29, 2011

Pushed, with some cleanups..., thanks!

@kimchy kimchy closed this Aug 29, 2011
thenano pushed a commit to thenano/elasticsearch-river-couchdb that referenced this pull request May 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants