I am relatively new to Elasticsearch so I could be just misunderstanding the concept of mapping, but when I check the mapping of an index I've created, I see that the type is correctly set to "integer"
, but when I use Logstash to send my docs to Elasticsearch, it doesn't display as an integer. It displays with quotes around it as a string (e.g. "201"
).
What am I doing wrong? I thought mapping meant you tell Elasticsearch what data type the field should be and it will make sure it registers as that.
I am using the logstash-filter-useragent
which is outputting the number that is not being correctly mapped as an integer.
UPDATE: Kind of figured some of it out. I was looking at the types in Kibana and the icons for the field types weren't refreshing. I realized I just needed to refresh them in the settings page. However, I'm still somewhat confused about why integer type fields are still showing up with quotation marks for me when I look at my docs in JSON format in the web browser.