File tree 1 file changed +14
-0
lines changed
server/src/test/java/org/elasticsearch/search/aggregations/metrics
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 52
52
import org .elasticsearch .search .aggregations .bucket .terms .TermsAggregationBuilder ;
53
53
import org .elasticsearch .search .aggregations .bucket .terms .TermsAggregator ;
54
54
import org .elasticsearch .search .aggregations .support .AggregationInspectionHelper ;
55
+ import org .elasticsearch .search .aggregations .support .CoreValuesSourceType ;
55
56
import org .elasticsearch .search .aggregations .support .ValueType ;
57
+ import org .elasticsearch .search .aggregations .support .ValuesSourceType ;
56
58
import org .elasticsearch .search .lookup .LeafDocLookup ;
57
59
58
60
import java .io .IOException ;
@@ -709,4 +711,16 @@ public void testScriptCaching() throws IOException {
709
711
directory .close ();
710
712
unmappedDirectory .close ();
711
713
}
714
+
715
+ @ Override
716
+ protected List <ValuesSourceType > getSupportedValuesSourceTypes () {
717
+ return List .of (
718
+ CoreValuesSourceType .NUMERIC
719
+ );
720
+ }
721
+
722
+ @ Override
723
+ protected AggregationBuilder createAggBuilderForTypeTest (MappedFieldType fieldType , String fieldName ) {
724
+ return new AvgAggregationBuilder ("foo" ).field (fieldName );
725
+ }
712
726
}
You can’t perform that action at this time.
0 commit comments