Class PivotFacetProcessor
- java.lang.Object
-
- org.apache.solr.request.SimpleFacets
-
- org.apache.solr.handler.component.PivotFacetProcessor
-
public class PivotFacetProcessor extends SimpleFacets
Processes all Pivot facet logic for a single node -- both non-distrib, and per-shard
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.request.SimpleFacets
SimpleFacets.CountPair<K extends Comparable<? super K>,V extends Comparable<? super V>>, SimpleFacets.ParsedParams
-
-
Constructor Summary
Constructors Constructor Description PivotFacetProcessor(SolrQueryRequest req, DocSet docs, org.apache.solr.common.params.SolrParams params, ResponseBuilder rb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPivotQueriesAndRanges(org.apache.solr.common.util.NamedList<Object> pivot, org.apache.solr.common.params.SolrParams params, DocSet docs, List<FacetComponent.FacetBase> facetQueries, List<RangeFacetRequest> facetRanges)
Add facet.queries and facet.ranges to the pivot response if neededprotected List<org.apache.solr.common.util.NamedList<Object>>
doPivots(org.apache.solr.common.util.NamedList<Integer> superFacets, String field, String subField, Deque<String> fnames, Deque<String> vnames, SimpleFacets.ParsedParams parsed, List<StatsField> statsFields, List<FacetComponent.FacetBase> facetQueries, List<RangeFacetRequest> facetRanges)
Recursive function to compute all the pivot counts for the values under the specified fieldorg.apache.solr.common.util.SimpleOrderedMap<List<org.apache.solr.common.util.NamedList<Object>>>
process(String[] pivots)
Processes all of the specifiedFacetParams.FACET_PIVOT
strings, generating a complete response tree for each pivot.-
Methods inherited from class org.apache.solr.request.SimpleFacets
checkMincountOnExists, computeDocSet, getDocsOrig, getFacetFieldCounts, getFacetIntervalCounts, getFacetQueryCount, getFacetQueryCounts, getFacetTermEnumCounts, getFacetTermEnumCounts, getFieldMissingCount, getGlobalParams, getGroupedCounts, getGroupedFacetQueryCount, getHeatmapCounts, getListedTermCounts, getRequest, getResponseBuilder, getTermCounts, getTermCountsForPivots, newBytesRefFilter, newExcludeBytesRefFilter, parseParams, setFacetDebugInfo
-
-
-
-
Field Detail
-
QUERY
public static final String QUERY
- See Also:
- Constant Field Values
-
RANGE
public static final String RANGE
- See Also:
- Constant Field Values
-
params
protected org.apache.solr.common.params.SolrParams params
-
-
Constructor Detail
-
PivotFacetProcessor
public PivotFacetProcessor(SolrQueryRequest req, DocSet docs, org.apache.solr.common.params.SolrParams params, ResponseBuilder rb)
-
-
Method Detail
-
process
public org.apache.solr.common.util.SimpleOrderedMap<List<org.apache.solr.common.util.NamedList<Object>>> process(String[] pivots) throws IOException
Processes all of the specifiedFacetParams.FACET_PIVOT
strings, generating a complete response tree for each pivot. The values in this response will either be the complete tree of fields and values for the specified pivot in the local index, or the requested refinements if the pivot params include thePivotFacet.REFINE_PARAM
- Throws:
IOException
-
doPivots
protected List<org.apache.solr.common.util.NamedList<Object>> doPivots(org.apache.solr.common.util.NamedList<Integer> superFacets, String field, String subField, Deque<String> fnames, Deque<String> vnames, SimpleFacets.ParsedParams parsed, List<StatsField> statsFields, List<FacetComponent.FacetBase> facetQueries, List<RangeFacetRequest> facetRanges) throws IOException
Recursive function to compute all the pivot counts for the values under the specified field- Throws:
IOException
-
addPivotQueriesAndRanges
protected void addPivotQueriesAndRanges(org.apache.solr.common.util.NamedList<Object> pivot, org.apache.solr.common.params.SolrParams params, DocSet docs, List<FacetComponent.FacetBase> facetQueries, List<RangeFacetRequest> facetRanges) throws IOException
Add facet.queries and facet.ranges to the pivot response if needed- Parameters:
pivot
- Pivot in which to inject additional dataparams
- Query parameters.docs
- DocSet of the current pivot to use for computing sub-countsfacetQueries
- Tagged facet queries should have to be included, must not be nullfacetRanges
- Taged facet ranges should have to be included, must not be null- Throws:
IOException
- If searcher has issues finding numDocs.
-
-