Class MinCollector<T extends ReductionData>
- java.lang.Object
-
- org.apache.solr.analytics.function.reduction.data.ReductionDataCollector<T>
-
- org.apache.solr.analytics.function.reduction.data.MinCollector<T>
-
- Type Parameters:
T
- The type of data being processed.
- Direct Known Subclasses:
MinCollector.DoubleMinCollector
,MinCollector.FloatMinCollector
,MinCollector.IntMinCollector
,MinCollector.LongMinCollector
,MinCollector.StringMinCollector
public abstract class MinCollector<T extends ReductionData> extends ReductionDataCollector<T>
Collector of min values.Supported types are:
- Int
- Long
- Float
- Double
- Date (through longs)
- String
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MinCollector.DoubleMinCollector
static class
MinCollector.FloatMinCollector
static class
MinCollector.IntMinCollector
static class
MinCollector.LongMinCollector
static class
MinCollector.StringMinCollector
-
Field Summary
Fields Modifier and Type Field Description static String
name
-
Fields inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
collectionTargets, ioData, lastingTargets
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MinCollector(AnalyticsValueStream param)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists()
Returns true if any of the values being reduce exist, and false if none of them do.String
getExpressionStr()
The unique expression string of the reduction data collector, given all inputs and parameters.String
getName()
Get the name of the reduction data collector.void
setData(ReductionData data)
Finalize the reduction with the collected data stored in the parameter.void
setMergedData(ReductionData data)
Finalize the reduction with the merged data stored in the parameter.-
Methods inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
addCollectTarget, addLastingCollectTarget, apply, clearLastingCollectTargets, collect, collectAndApply, dataIO, newData, newDataIO, newDataTarget, submitReservations
-
-
-
-
Field Detail
-
name
public static final String name
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MinCollector
protected MinCollector(AnalyticsValueStream param)
-
-
Method Detail
-
exists
public boolean exists()
Returns true if any of the values being reduce exist, and false if none of them do.- Returns:
- whether a min value exists
-
setMergedData
public void setMergedData(ReductionData data)
Description copied from class:ReductionDataCollector
Finalize the reduction with the merged data stored in the parameter. Once the reduction is finalized, theReductionFunction
s that use this data collector act like regularAnalyticsValue
classes that can be accessed through theirget<value-type>
methods.(FOR CLOUD)
- Specified by:
setMergedData
in classReductionDataCollector<T extends ReductionData>
- Parameters:
data
- the merged data to compute a reduction for
-
setData
public void setData(ReductionData data)
Description copied from class:ReductionDataCollector
Finalize the reduction with the collected data stored in the parameter. Once the reduction is finalized, theReductionFunction
s that use this data collector act like regularAnalyticsValue
classes that can be accessed through theirget<value-type>
methods.(FOR SINGLE-SHARD)
- Specified by:
setData
in classReductionDataCollector<T extends ReductionData>
- Parameters:
data
- the collected data to compute a reduction for
-
getName
public String getName()
Description copied from class:ReductionDataCollector
Get the name of the reduction data collector. This is the same across all instances of the data collector.- Specified by:
getName
in classReductionDataCollector<T extends ReductionData>
- Returns:
- the name
-
getExpressionStr
public String getExpressionStr()
Description copied from class:ReductionDataCollector
The unique expression string of the reduction data collector, given all inputs and parameters. Used duringReductionDataCollector
syncing. Since the string should be unique, only one of expression is kept.- Specified by:
getExpressionStr
in classReductionDataCollector<T extends ReductionData>
- Returns:
- the expression string
-
-