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

in mapping, type having "float" as value would be also convert to "number" #9

Closed
Moosh-be opened this issue Aug 3, 2016 · 2 comments

Comments

@Moosh-be
Copy link

Moosh-be commented Aug 3, 2016

context

when I generate a new index pattern there is 2 attributes

geoip.longitude and geoip.latitude wich are "float"
kibana want type="number" and format="string"

ref : https://www.elastic.co/guide/en/kibana/current/managing-fields.html#_geographic_point_field_formatters

my poor solution

So, even if I never code in python, I found in mapping.py
https://github.com/rfarley3/Kibana/blob/master/kibana/mapping.py#L257

    if key in self.mappings:
                if (key == 'type' and
                    (val == "long" or
                     val == "integer" or
                     val == "double")):
                    val = "number"

I've change it

 if key in self.mappings:
                if (key == 'type' and
                    (val == "long" or
                     val == "float" or
                     val == "integer" or
                     val == "double")):
                    val = "number"

and it's works fine

(even if format still empty and not "sprint" as request)


Question of beginner :
Why export config, viz, search and board but not index-pattern ?
index-pattern is needed to a correct import.

@Moosh-be Moosh-be changed the title in mapping values "float" would be also convert to number in mapping, type having "float" as value would be also convert to "number" Aug 4, 2016
@rfarley3
Copy link
Owner

rfarley3 commented Aug 5, 2016

Thanks for noticing this. It's now fixed in PR #8. Closing this. I'll be making a new pypi release later today with some other small fixes.

Feel free to open a new issue about exporting index-pattern. I don't currently see a need for this, please explain in more detail (in the new issue). Did you know that you can dotkibana --export all --pkg to get everything at once.

@rfarley3 rfarley3 closed this as completed Aug 5, 2016
@Moosh-be
Copy link
Author

Moosh-be commented Aug 8, 2016

Great.
I check dotkibana --export all --pkg
I would create a new issue to explain my need if dotkibana --export all --pkg doesn't respond to it

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