elasticsearch
elasticsearch copied to clipboard
Don't use fielddataBuilder to test for aggregatability
The current default implementation of isAggregatable on MappedFieldType
tries to construct a field data builder, and returns true or false depending on
whether an exception was thrown during construction. This is fairly fragile, and
is becoming increasingly so with the introduction of field data contexts, so that
a non-aggregatable field type may in fact provide field data to scripts.
This commit changes the default implementation to check for docvalues instead
of directly building a fielddata builder, and adds checks to MapperTestCase that
verify these implementations work correctly.
Pinging @elastic/es-search (Team:Search)
Well. Jenkins is panicing a bit. So maybe not that easy.
@elasticmachine run elasticsearch-ci/part-1
@elasticmachine update branch