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

remove underscore attrs when indexing/creating #247

Conversation

douglasroeder
Copy link
Contributor

When using the Bulk API for actions like 'index' or 'create' we are not removing the set of reserved keywords (@underscored) attributes from the document, this PR just apply the 'drop_underscored()' function. Is there a reason for that? I'm not an expert on ES, so forgive me if I'm missing something.

@OpakAlex
Copy link
Collaborator

OpakAlex commented Oct 2, 2016

I think we don't need remove this attributes.

@douglasroeder
Copy link
Contributor Author

@OpakAlex I've forgot to mention, I did it because my application running on ES 2.4 was raising this exception when indexing documents with attributes like '_parent':

 MapperParsingException[Field [_parent] is a metadata field and cannot be added inside a document. Use the index API request parameters.]

Not sure if it's a version thing, but I reckon those attributes are not allowed on any circumstances, let me know your thoughts

@douglasroeder
Copy link
Contributor Author

I did some further investigation adding an acceptance test using my other PR (support for extra mapping settings) and it's weird because it did work with the '_parent' attribute as part of the document when indexing it. I'll wait for that PR to be approved and add some acceptance tests for Tirexs.Bulk module.

@Zatvobor
Copy link
Owner

Zatvobor commented Oct 5, 2016

awesome. Thanks

@Zatvobor Zatvobor merged commit 80b6136 into Zatvobor:master Oct 5, 2016
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.

3 participants