Unfortunately, scripted fields cannot be used in the X-Axis because the X-Axis is what is being filtered on and scripted fields cannot be used for filtering/searching.
I would suggest using your scripted field script with the Update By Query API to fix your documents. With this API you can modify the documents using a painless script (should be similar to your scripted field). Keep in mind, that any new data being ingested will need to be updated as well. You can do this either at the source, or by using an Ingest Pipeline to cleanup data.
@joshdover_update_by_query to fix this field is something I'm planning on.
In SQL I would be able to select floor(x/1000) as x from t group by x which would aggregate on the field as it has been indexed but then return a "fixed" value for x. I suppose there is no way to do this for Kibana?
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.