Visualize: Expected numeric type on field [some_field], but got [string]

Hi,
When going to the index setting I clearly see that the type for field some_field is number.
But in the visualization I'm getting this error when trying to do an "average" on this field-

"Visualize: Expected numeric type on field [some_field], but got [string]"

How can I tell what is the issue here?
I also have other indices which have the same some_field and there it's a string. Could it be the cause? If so, I would love to get an explanation why.

Thanks.

I also have other indices which have the same some_field and there it's a string. Could it be the cause? If so, I would love to get an explanation why.

Do those indices match your kibana index pattern? If not, it shouldn't be a problem.

If you open the network tab of your browser's dev tools you should find an _msearch request when reloading the visualization. Looking at the request and response to/from elasticsearch might help us see what's going on.

Hi @Bargs,
I did as you suggested, the _msearch query is searching the index that shows me these 2 fields as numbers when I look in Kibana settings > Indices.
When I look in elasticsearch at the mapping of my index I see they are strings.. how could it be?

Thanks

Which section are you looking at, "Index Management" or "Index Patterns"?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.