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

Change the default _type to be _doc #1750

Merged
merged 1 commit into from
May 5, 2020
Merged

Conversation

srkiNZ84
Copy link
Contributor

In order to be compatible with the new versions of ElasticSearch which effectively are getting rid of
_type, we should change the default type to be "_doc"

As per the ElasticSearch forum discussion at:

https://discuss.elastic.co/t/7-0-1-template-with-geo-point-geoip-processor-in-pipeline-bulk-crash/182039/3

this seems to be due to not specifying a _type when creating the mapping, at which point it defaults
to "_doc".

Later when performing a bulk operation (indexing) we specifying that _type is "flb_type" which then
causes the error to be thrown about multiple types not being allowed:

"Rejecting mapping update to [logs-2019.11.16] as the final mapping would have more than 1 type: [_doc, flb_type]"

Another possible solution to this issue might be to use the "flb_type" when creating the index (and mappings)
initially, however I'm not sure whether this type is being used for anything (we are not filtering or querying
based on it).

Issue(s): #1359

@srkiNZ84
Copy link
Contributor Author

I should also mention that the documentation would need to be updated, just wanted to get some feedback on the approach (whether we want to change the default to "_doc" or just explicitly set the type on index creation time).

In order to be compatible with the new versions of ElasticSearch which effectively are getting rid of
_type, we should change the default type to be "_doc"

As per the ElasticSearch forum discussion at:

https://discuss.elastic.co/t/7-0-1-template-with-geo-point-geoip-processor-in-pipeline-bulk-crash/182039/3

this seems to be due to not specifying a _type when creating the mapping, at which point it defaults
to "_doc".

Later when performing a bulk operation (indexing) we specifying that _type is "flb_type" which then
causes the error to be thrown about multiple types not being allowed:

"Rejecting mapping update to [logs-2019.11.16] as the final mapping would have more than 1 type: [_doc, flb_type]"

Another possible solution to this issue might be to use the "flb_type" when creating the index (and mappings)
initially, however I'm not sure whether this type is being used for anything (we are not filtering or querying
based on it).

Issue(s): fluent#1359

Signed-off-by: Srdan Dukic <[email protected]>
@guitcastro
Copy link

Can this be merged, please?

@edsiper edsiper merged commit 04ed3d8 into fluent:master May 5, 2020
@edsiper
Copy link
Member

edsiper commented May 5, 2020

thanks!

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.

4 participants