public static class CountCollector.ExpressionCountCollector extends CountCollector
count(expr)
expression. This collects 3 values:
docCount - The number of Solr Documents for which the wrapped expression exists.
count - The number of values which wrapped expression contains.
missing - The number of Solr Documents for which the wrapped expression does not exist.CountCollector.CountData, CountCollector.ExpressionCountCollector, CountCollector.TotalCountCollector
name
collectionTargets, ioData, lastingTargets
Constructor and Description |
---|
ExpressionCountCollector(AnalyticsValueStream param) |
Modifier and Type | Method and Description |
---|---|
protected void |
apply(CountCollector.CountData data)
Apply the collected info to the given reduction data.
|
void |
collect()
Collect the information from current Solr Document.
|
long |
missing()
The number of Solr Documents for which the given analytics expression does not exist.
|
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.
|
void |
submitReservations(Consumer<ReductionDataReservation<?,?>> consumer)
Submits the data reservations needed for this data collector.
|
count, docCount, getExpressionStr, getName, newData
addCollectTarget, addLastingCollectTarget, clearLastingCollectTargets, collectAndApply, dataIO, newDataIO, newDataTarget
public ExpressionCountCollector(AnalyticsValueStream param)
public long missing()
public void setMergedData(ReductionData data)
ReductionDataCollector
ReductionFunction
s that use this
data collector act like regular AnalyticsValue
classes that
can be accessed through their get<value-type>
methods.
(FOR CLOUD)setMergedData
in class CountCollector
data
- the merged data to compute a reduction forpublic void setData(ReductionData data)
ReductionDataCollector
ReductionFunction
s that use this
data collector act like regular AnalyticsValue
classes that
can be accessed through their get<value-type>
methods.
(FOR SINGLE-SHARD)setData
in class CountCollector
data
- the collected data to compute a reduction forpublic void collect()
ReductionDataCollector
collect
in class ReductionDataCollector<CountCollector.CountData>
protected void apply(CountCollector.CountData data)
ReductionDataCollector
ReductionDataCollector.collect()
call.apply
in class ReductionDataCollector<CountCollector.CountData>
data
- reduction data to apply collected info topublic void submitReservations(Consumer<ReductionDataReservation<?,?>> consumer)
ReductionDataCollector
submitReservations
in class CountCollector
consumer
- the consumer which the reservations are submitted toCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.