Aggregation: Field data loading is forbidden on[ ]

Hi, I am using logstash to parse some access.log and send it to elasticsearch.

I am trying to use an aggregation to get distinct values of a ProductCode Field which is a string.
when i run this command request :

POST localhost:9200/logstash-2016.04.18/_search
{
"aggs": {
"t": {
"terms": {
"field": "productcode"
}
}
}
}

I get this result:

{
"error": {
"root_cause": [
{
"type": "illegal_state_exception",
"reason": "Field data loading is forbidden on [productcode]"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "logstash-2016.04.18",
"node": "hM-NdbGUQdGCrcgUDkhXgA",
"reason": {
"type": "illegal_state_exception",
"reason": "Field data loading is forbidden on [productcode]"
}
}
]
},
"status": 500
}