Class ValuesSourceAggregatorFactory<VS extends ValuesSource>

    • Method Detail

      • resolveMissingAny

        protected ValuesSource resolveMissingAny​(java.lang.Object missing)
        This method provides a hook for aggregations that need finer grained control over the ValuesSource selected when the user supplies a missing value and there is no mapped field to infer the type from. This will only be called for aggregations that specify the ValuesSourceType.ANY in their constructors (On the builder class). The user supplied object is passed as a parameter, so its type may be inspected as needed. Generally, only the type of the returned ValuesSource is used, so returning the EMPTY instance of the chosen type is recommended.
        Parameters:
        missing - The user supplied missing value
        Returns:
        A ValuesSource instance compatible with the supplied parameter
      • createUnmapped

        protected abstract Aggregator createUnmapped​(Aggregator parent,
                                                     java.util.List<PipelineAggregator> pipelineAggregators,
                                                     java.util.Map<java.lang.String,​java.lang.Object> metaData)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • doCreateInternal

        protected abstract Aggregator doCreateInternal​(VS valuesSource,
                                                       Aggregator parent,
                                                       boolean collectsFromSingleBucket,
                                                       java.util.List<PipelineAggregator> pipelineAggregators,
                                                       java.util.Map<java.lang.String,​java.lang.Object> metaData)
                                                throws java.io.IOException
        Throws:
        java.io.IOException