@@ -54,7 +54,7 @@ public class ValuesSourceRegistry {
5454     * different worker threads.  Thus we want to optimize the read case to be thread safe and fast, which the immutable 
5555     * collections do well.  Using immutable collections requires a copy on write mechanic, thus the somewhat non-intuitive 
5656     * implementation of this method. 
57-      * @param aggregationName The name of the family of aggregations, typically found via ValuesSourceAggregationBuilder. getType() 
57+      * @param aggregationName The name of the family of aggregations, typically found via {@link  ValuesSourceAggregationBuilder# getType()}  
5858     * @param appliesTo A predicate which accepts the resolved {@link ValuesSourceType} and decides if the given aggregator can be applied 
5959     *                  to that type. 
6060     * @param aggregatorSupplier An Aggregation-specific specialization of AggregatorSupplier which will construct the mapped aggregator 
@@ -75,7 +75,7 @@ public synchronized void register(String aggregationName, Predicate<ValuesSource
7575    /** 
7676     * Register a ValuesSource to Aggregator mapping.  This version provides a convenience method for mappings that only apply to a single 
7777     * {@link ValuesSourceType}, to allow passing in the type and auto-wrapping it in a predicate 
78-      *  @param aggregationName The name of the family of aggregations, typically found via ValuesSourceAggregationBuilder. getType() 
78+      *  @param aggregationName The name of the family of aggregations, typically found via {@link  ValuesSourceAggregationBuilder# getType()}  
7979     * @param valuesSourceType The ValuesSourceType this mapping applies to. 
8080     * @param aggregatorSupplier An Aggregation-specific specialization of AggregatorSupplier which will construct the mapped aggregator 
8181     *                           from the aggregation standard set of parameters 
@@ -87,7 +87,7 @@ public void register(String aggregationName, ValuesSourceType valuesSourceType,
8787    /** 
8888     * Register a ValuesSource to Aggregator mapping.  This version provides a convenience method for mappings that only apply to a known 
8989     * list of {@link ValuesSourceType}, to allow passing in the type and auto-wrapping it in a predicate 
90-      *  @param aggregationName The name of the family of aggregations, typically found via ValuesSourceAggregationBuilder. getType() 
90+      *  @param aggregationName The name of the family of aggregations, typically found via {@link  ValuesSourceAggregationBuilder# getType()}  
9191     * @param valuesSourceTypes The ValuesSourceTypes this mapping applies to. 
9292     * @param aggregatorSupplier An Aggregation-specific specialization of AggregatorSupplier which will construct the mapped aggregator 
9393     *                           from the aggregation standard set of parameters 
@@ -103,6 +103,19 @@ public void register(String aggregationName, List<ValuesSourceType> valuesSource
103103        }, aggregatorSupplier );
104104    }
105105
106+     /** 
107+      * Register an aggregator that applies to any values source type.  This is a convenience method for aggregations that do not care at all 
108+      * about the types of their inputs.  Aggregations using this version of registration should not make any other registrations, as the 
109+      * aggregator registered using this function will be applied in all cases. 
110+      * 
111+      * @param aggregationName The name of the family of aggregations, typically found via {@link ValuesSourceAggregationBuilder#getType()} 
112+      * @param aggregatorSupplier An Aggregation-specific specialization of AggregatorSupplier which will construct the mapped aggregator 
113+      *                           from the aggregation standard set of parameters. 
114+      */ 
115+     public  void  registerAny (String  aggregationName , AggregatorSupplier  aggregatorSupplier ) {
116+         register (aggregationName , (ignored ) -> true , aggregatorSupplier );
117+     }
118+ 
106119    private  AggregatorSupplier  findMatchingSuppier (ValuesSourceType  valuesSourceType ,
107120                                                   List <Map .Entry <Predicate <ValuesSourceType >, AggregatorSupplier >> supportedTypes ) {
108121        for  (Map .Entry <Predicate <ValuesSourceType >, AggregatorSupplier > candidate  : supportedTypes ) {
0 commit comments