Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting _index and _type with CouchDB river #1219

Closed
akheron opened this issue Aug 9, 2011 · 1 comment
Closed

Allow setting _index and _type with CouchDB river #1219

akheron opened this issue Aug 9, 2011 · 1 comment

Comments

@akheron
Copy link
Contributor

akheron commented Aug 9, 2011

Suppose two types of documents are stored in CouchDB. The document types can be detected somehow, e.g. by reading a field's valud. The user wants to index the different document types as different types in a single ElasticSearch index, or in multiple ElasticSearch indices, or both.

Currently, the only way to do this is to setup two rivers, one for each type, with appropriate filters to filter the corresponding document types from CouchDB. This hits performance, as CouchDB will have to read all documents twice. If there are more than two document types, this gets even worse.

So I'm suggesting to allow to somehow set the _type and _index values so that the indexing could be accomplished with a single river.

We will allow for a custom script to set _type and _index (probably based on the document content), and if set, those values will be used instead of the default ones.

And, while we are at it, allow for _routing as well.

@kimchy kimchy closed this as completed in eef4ec2 Aug 9, 2011
@Ganican
Copy link

Ganican commented Dec 14, 2012

Is there way to use any other field in the CouchDB document to cast type. Or it should be defined exactly that way as "_type"?

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
jev001 pushed a commit to jev001/elasticsearch that referenced this issue Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants