public class AnalyticsGroupingManager extends Object
This class will only manage generating faceted results, not overall results.
| Constructor and Description | 
|---|
| AnalyticsGroupingManager(String name,
                        ReductionCollectionManager reductionCollectionManager,
                        Collection<AnalyticsExpression> topLevelExpressions) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addFacet(AnalyticsFacet facet)Add a facet to the grouping. | 
| NamedList<Object> | createOldResponse(Map<String,Object> overallResults)Create the response for this grouping, but in the old style of response. | 
| Map<String,Object> | createResponse()Create the response for this grouping, a mapping from each of it's facets' names to the facet's response. | 
| void | exportShardData(DataOutput output)Export the shard data for this grouping through a bit-stream,
 to be imported by the  importShardData(java.io.DataInput)method in the originating shard. | 
| void | getFacetExecuters(Filter filter,
                 SolrQueryRequest queryRequest,
                 Consumer<AbstractSolrQueryFacet.FacetValueQueryExecuter> cons)Create the  AbstractSolrQueryFacet.FacetValueQueryExecuters for allAbstractSolrQueryFacets
 (e.g. | 
| String | getName()Get the name of the grouping. | 
| ReductionCollectionManager | getReductionManager()Get the  ReductionCollectionManagerthat manages the collection of reduction data for the expressions
 contained within this grouping. | 
| boolean | getStreamingFacets(Consumer<StreamingFacet> cons)Get the  StreamingFacets (e.g. | 
| void | importShardData(DataInput input)Import the shard data for this grouping from a bit-stream,
 exported by the  exportShardData(java.io.DataOutput)method in the each of the collection's shards. | 
public AnalyticsGroupingManager(String name, ReductionCollectionManager reductionCollectionManager, Collection<AnalyticsExpression> topLevelExpressions)
public boolean getStreamingFacets(Consumer<StreamingFacet> cons)
StreamingFacets (e.g. ValueFacet and PivotFacet) contained within this grouping,
 returning them through the given consumer.cons - where the streaming facets are passed topublic void getFacetExecuters(Filter filter, SolrQueryRequest queryRequest, Consumer<AbstractSolrQueryFacet.FacetValueQueryExecuter> cons)
AbstractSolrQueryFacet.FacetValueQueryExecuters for all AbstractSolrQueryFacets
 (e.g. QueryFacet and RangeFacet) contained within this grouping.
 The executers are returned through the given consumer.
 
 
 One AbstractSolrQueryFacet.FacetValueQueryExecuter is created for each facet value to be returned for a facet.
 Since every AbstractSolrQueryFacet has discrete and user-defined facet values,
 unlike StreamingFacets, a discrete number of AbstractSolrQueryFacet.FacetValueQueryExecuters are created and returned.
filter - representing the overall Solr Query of the request,
 will be combined with the facet value queriesqueryRequest - from the overall search requestcons - where the executers are passed topublic void addFacet(AnalyticsFacet facet)
facet - to compute expressions overpublic void importShardData(DataInput input) throws IOException
exportShardData(java.io.DataOutput) method in the each of the collection's shards.input - The bit-stream to import the grouping data fromIOException - if an exception occurs while reading from the DataInputpublic void exportShardData(DataOutput output) throws IOException
importShardData(java.io.DataInput) method in the originating shard.output - The bit-stream to output the grouping data throughIOException - if an exception occurs while writing to the DataOutputpublic ReductionCollectionManager getReductionManager()
ReductionCollectionManager that manages the collection of reduction data for the expressions
 contained within this grouping.public Map<String,Object> createResponse()
public NamedList<Object> createOldResponse(Map<String,Object> overallResults)
Since groupings in the old notation must also return overall results, the overall results are passed in and the values are used to populate the grouping response.
overallResults - of the expressions to add to the grouping responsepublic String getName()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.