Using Terms aggregation on custom type

(Geert Vos) #1


We are working on search engine that is optimized for searching in time.
The bases is an elasticsearch cluster with a plugin that registers our own
type. The type we created is registered using our own type name:

Now we try to use the built in aggregations on our own type, and
ElasticSearch throws an exception because it cannot find any field data

Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: failed
to find field data builder for field, and type
at org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(

It seems that the index field data service needs to have our type
registered. But, it looks like all types are hardcoded in the service and
there is no extension point. The IndexFieldDataService checks the following
maps, which are all immutable: "buildersByType", "docValuesBuildersByType",

How can we reuse the terms aggregation for our own type? Or do we need to
write our own aggregation?

With kinds regards,
Geert Vos

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit

(system) #2