Package org.apache.solr.analytics.facet
Class ValueFacet
- java.lang.Object
-
- org.apache.solr.analytics.facet.AnalyticsFacet
-
- org.apache.solr.analytics.facet.SortableFacet
-
- org.apache.solr.analytics.facet.ValueFacet
-
- All Implemented Interfaces:
Consumer<String>
,StreamingFacet
public class ValueFacet extends SortableFacet implements StreamingFacet, Consumer<String>
A facet that breaks up data by the values of a mapping expression or field. The mapping expression must be castable to aStringValueStream
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.analytics.facet.SortableFacet
SortableFacet.FacetBucket, SortableFacet.FacetSortSpecification
-
-
Field Summary
-
Fields inherited from class org.apache.solr.analytics.facet.SortableFacet
sort
-
Fields inherited from class org.apache.solr.analytics.facet.AnalyticsFacet
collectionManager, expressionCalculator, name, reductionData
-
-
Constructor Summary
Constructors Constructor Description ValueFacet(String name, StringValueStream expression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(String t)
void
addFacetValueCollectionTargets()
Determine which facet values match the current document.StringValueStream
getExpression()
Get the expression used to create the facet values.-
Methods inherited from class org.apache.solr.analytics.facet.SortableFacet
applyOptions, createOldResponse, createResponse, getSort, setSort
-
Methods inherited from class org.apache.solr.analytics.facet.AnalyticsFacet
exportFacetValue, exportShardData, getName, importFacetValue, importShardData, setExpressionCalculator, setReductionCollectionManager
-
-
-
-
Constructor Detail
-
ValueFacet
public ValueFacet(String name, StringValueStream expression)
-
-
Method Detail
-
addFacetValueCollectionTargets
public void addFacetValueCollectionTargets()
Description copied from interface:StreamingFacet
Determine which facet values match the current document. Add theReductionCollectionManager.ReductionDataCollection
s of the relevant facet values to the targets of the streamingReductionCollectionManager
so that they are updated with the current document's data.- Specified by:
addFacetValueCollectionTargets
in interfaceStreamingFacet
-
getExpression
public StringValueStream getExpression()
Get the expression used to create the facet values.- Returns:
- a string mapping expression
-
-