Cannot invoke "Object.getClass()" because "right" is null when creating a TSVB with value_count

Hello,
I’ve created a rollup job for value count my documents from an index every day in order to have daily stats.
But when i create an TSVB visual with Value Count aggregation I get:

The request for this panel failed
Cannot invoke "Object.getClass()" because "right" is null
valueCount += vc } 
^---- HERE

image
If I use search api like this

{
    "aggs": {
        "types_count": {
            "value_count": {
                "field": "field_name.keyword"
            }
        }
    }
}

I get:

"aggregations": {
        "types_count": {
            "value": 10896409
        }
    }

Hi @H1gH,

Can you share your rollup job and source index mappings so we can attempt to replicate the issue?

Thanks

Hi,
sorry for this late answer, I was in vacation for the past days.
Our mapping is

{
“machine_info” : {
“mappings” : {
“properties” : {
@timestamp” : {
“type” : “date”
},
@version” : {
“type” : “text”,
“fields” : {
“keyword” : {
“type” : “keyword”,
“ignore_above” : 256
}
}
},
“info_name” : {
“type” : “text”,
“fields” : {
“keyword” : {
“type” : “keyword”,
“ignore_above” : 256
}
}
},
“name” : {
“type” : “text”,
“fields” : {
“keyword” : {
“type” : “keyword”,
“ignore_above” : 256
}
}
},
“info_version” : {
“type” : “long”
}
}

And our rollup job is

{
“_id”: “testing_rollup_job”,
“_seqNo”: 1036,
“_primaryTerm”: 34,
“rollup”: {
“rollup_id”: “testing_rollup_job”,
“enabled”: false,
“schedule”: {
“interval”: {
“start_time”: 1625206447835,
“period”: 1,
“unit”: “Days”
}
},
“last_updated_time”: 1625206447836,
“enabled_time”: null,
“description”: “”,
“schema_version”: 6,
“source_index”: “machine_info”,
“target_index”: “machine_info_test”,
“metadata_id”: null,
“roles”: ,
“page_size”: 1000,
“delay”: 0,
“continuous”: true,
“dimensions”: [
{
“date_histogram”: {
“fixed_interval”: “1d”,
“source_field”: “@timestamp”,
“target_field”: “@timestamp”,
“timezone”: “UTC”
}
},
{
“terms”: {
“source_field”: “name.keyword”,
“target_field”: “name.keyword”
}
}
],
“metrics”: [
{
“source_field”: “info_version”,
“metrics”: [
{
“value_count”: {}
}
]
}
]
},
“metadata”: {
“testing_rollup_job”: {
“metadata_id”: null,
“rollup_metadata”: null
}
}
}