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

attributes with dots #4

Open
faxm0dem opened this issue Jan 28, 2016 · 4 comments
Open

attributes with dots #4

faxm0dem opened this issue Jan 28, 2016 · 4 comments

Comments

@faxm0dem
Copy link

Since ES2.x dots are not allowed in field names:

MapperParsingException[Field name [facter.operatingsystem] cannot contain '.']

The natural way to handle this would IMHO be to coerce foo.bar = "baz" into {"foo": {"bar" : "baz"}}.
The problem is I'm not very good at clojure, so I'm kindly asking if this is a feature which would seem interesting and if somebody would be willing to point me into the right direction.

What scares me most is the need to handle this recursively. But isn't list all about recursion?

@faxm0dem
Copy link
Author

I see from the json documentation that it's possible to

parse some json and munge keywords with a custom function

maybe something's possible using that?

@faxm0dem
Copy link
Author

I wrote a POC here thanks to @algernon and sorry for my poor^wridiculous clojure skills

@tnn1t1s
Copy link
Owner

tnn1t1s commented Feb 12, 2016

that link doesn't resolve for me. can you cut/paste a diff and reply?

On Fri, Jan 29, 2016 at 11:26 AM, Fabien Wernli [email protected]
wrote:

I wrote a POC here
http:///ccin2p3/riemann-elastic/tree/f/dotted_attribute_keys thanks to
@algernon https://github.com/algernon and sorry for my poor^wridiculous
clojure skills


Reply to this email directly or view it on GitHub
#4 (comment)
.

@faxm0dem
Copy link
Author

I updated the solution but didn't upload it yet I'll make a PR asap

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

No branches or pull requests

2 participants