Class MinCollector.StringMinCollector
- java.lang.Object
-
- org.apache.solr.analytics.function.reduction.data.ReductionDataCollector<T>
-
- org.apache.solr.analytics.function.reduction.data.MinCollector<MinCollector.StringMinCollector.MinData>
-
- org.apache.solr.analytics.function.reduction.data.MinCollector.StringMinCollector
-
- Enclosing class:
- MinCollector<T extends ReductionData>
public static class MinCollector.StringMinCollector extends MinCollector<MinCollector.StringMinCollector.MinData>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMinCollector.StringMinCollector.MinData-
Nested classes/interfaces inherited from class org.apache.solr.analytics.function.reduction.data.MinCollector
MinCollector.DoubleMinCollector, MinCollector.FloatMinCollector, MinCollector.IntMinCollector, MinCollector.LongMinCollector, MinCollector.StringMinCollector
-
-
Field Summary
-
Fields inherited from class org.apache.solr.analytics.function.reduction.data.MinCollector
name
-
Fields inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
collectionTargets, ioData, lastingTargets
-
-
Constructor Summary
Constructors Constructor Description StringMinCollector(StringValueStream param)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapply(MinCollector.StringMinCollector.MinData data)Apply the collected info to the given reduction data.voidcollect()Collect the information from current Solr Document.Stringmin()Returns the min value of the set data.MinCollector.StringMinCollector.MinDatanewData()A clean slate to start a new reduction.voidsetData(ReductionData data)Finalize the reduction with the collected data stored in the parameter.voidsetMergedData(ReductionData data)Finalize the reduction with the merged data stored in the parameter.voidsubmitReservations(Consumer<ReductionDataReservation<?,?>> consumer)Submits the data reservations needed for this data collector.-
Methods inherited from class org.apache.solr.analytics.function.reduction.data.MinCollector
exists, getExpressionStr, getName
-
Methods inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
addCollectTarget, addLastingCollectTarget, clearLastingCollectTargets, collectAndApply, dataIO, newDataIO, newDataTarget
-
-
-
-
Constructor Detail
-
StringMinCollector
public StringMinCollector(StringValueStream param)
-
-
Method Detail
-
newData
public MinCollector.StringMinCollector.MinData newData()
Description copied from class:ReductionDataCollectorA clean slate to start a new reduction.- Specified by:
newDatain classReductionDataCollector<MinCollector.StringMinCollector.MinData>- Returns:
- the new reduction data
-
min
public String min()
Returns the min value of the set data.- Returns:
- the min
-
collect
public void collect()
Description copied from class:ReductionDataCollectorCollect the information from current Solr Document.- Overrides:
collectin classReductionDataCollector<MinCollector.StringMinCollector.MinData>
-
apply
protected void apply(MinCollector.StringMinCollector.MinData data)
Description copied from class:ReductionDataCollectorApply the collected info to the given reduction data. Should always be called after aReductionDataCollector.collect()call.- Specified by:
applyin classReductionDataCollector<MinCollector.StringMinCollector.MinData>- Parameters:
data- reduction data to apply collected info to
-
submitReservations
public void submitReservations(Consumer<ReductionDataReservation<?,?>> consumer)
Description copied from class:ReductionDataCollectorSubmits the data reservations needed for this data collector.- Specified by:
submitReservationsin classReductionDataCollector<MinCollector.StringMinCollector.MinData>- Parameters:
consumer- the consumer which the reservations are submitted to
-
setMergedData
public void setMergedData(ReductionData data)
Description copied from class:ReductionDataCollectorFinalize the reduction with the merged data stored in the parameter. Once the reduction is finalized, theReductionFunctions that use this data collector act like regularAnalyticsValueclasses that can be accessed through theirget<value-type>methods.(FOR CLOUD)
- Overrides:
setMergedDatain classMinCollector<MinCollector.StringMinCollector.MinData>- Parameters:
data- the merged data to compute a reduction for
-
setData
public void setData(ReductionData data)
Description copied from class:ReductionDataCollectorFinalize the reduction with the collected data stored in the parameter. Once the reduction is finalized, theReductionFunctions that use this data collector act like regularAnalyticsValueclasses that can be accessed through theirget<value-type>methods.(FOR SINGLE-SHARD)
- Overrides:
setDatain classMinCollector<MinCollector.StringMinCollector.MinData>- Parameters:
data- the collected data to compute a reduction for
-
-