Kibana version: 7.5.1 Elasticsearch version: 7.5.1 APM Server version: 7.5.1 APM Agent language and version: Node.JS 3.3.0 Original install method (e.g. download page, yum, deb, from source, etc.) and version: Elastic Cloud
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I have added 2 labels which are integers to a span using .addLabels({ "bucket": 213 }) however the index seems to have set them to the type keyword. I am wanting to use the labels in visualizations however if I use the Area visualization and choose average for the Y-axis the labels do not appear in the fields dropdown (the labels exist in the documents when I view them in discover). I'm not sure if this is related to the fields having the wrong type in the index or not - if this is the issue how can I correct this?
Except for supported mapping parameters, you can’t change the mapping or field type of an existing field. Changing an existing field could invalidate data that’s already indexed.
If you need to change the mapping of a field, create a new index with the correct mapping and reindex your data into that index.
You have a few options:
Delete your existing docs and mappings. I assume you want to keep data, I'm just listing this for completeness.
Start using a different name for your labels, so there's no collision with the existing mapping/field type.
Create a new mapping, and reindex your data. You could either drop the existing stringified label fields, or convert to numbers, using an Ingest node pipeline.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.