public abstract class FacetRequest extends Object
parse(SolrQueryRequest, Map)
Modifier and Type | Class and Description |
---|---|
static class |
FacetRequest.Domain |
static class |
FacetRequest.FacetSort
Simple structure for encapsulating a sort variable and a direction
|
static class |
FacetRequest.RefineMethod |
static class |
FacetRequest.SortDirection |
Modifier and Type | Field and Description |
---|---|
protected FacetRequest.Domain |
domain |
protected Map<String,AggValueSource> |
facetStats |
protected boolean |
processEmpty |
protected Map<String,FacetRequest> |
subFacets |
Constructor and Description |
---|
FacetRequest() |
Modifier and Type | Method and Description |
---|---|
void |
addStat(String key,
AggValueSource stat) |
void |
addSubFacet(String key,
FacetRequest facetRequest) |
boolean |
canProduceFromEmpty()
Returns true if this facet, or any sub-facets can produce results from an empty domain.
|
abstract FacetMerger |
createFacetMerger(Object prototype) |
abstract FacetProcessor |
createFacetProcessor(org.apache.solr.search.facet.FacetContext fcontext) |
boolean |
doRefine() |
abstract Map<String,Object> |
getFacetDescription() |
Map<String,AggValueSource> |
getFacetStats() |
FacetRequest.RefineMethod |
getRefineMethod()
Returns null if unset
|
Map<String,FacetRequest> |
getSubFacets() |
static FacetRequest |
parse(SolrQueryRequest req,
Map<String,Object> params)
Factory method to parse a facet request tree.
|
static FacetRequest |
parseOneFacetReq(SolrQueryRequest req,
Map<String,Object> params)
Factory method to parse out a rooted facet request tree that would normally go one level below a label.
|
Object |
process(SolrQueryRequest req,
DocSet domain)
Process this facet request against the given domain of docs.
|
boolean |
returnsPartial()
Returns true if this facet can return just some of the facet buckets that match all the criteria.
|
String |
toString() |
protected Map<String,AggValueSource> facetStats
protected Map<String,FacetRequest> subFacets
protected boolean processEmpty
protected FacetRequest.Domain domain
public static FacetRequest parse(SolrQueryRequest req, Map<String,Object> params)
SolrException
if it fails to parse.req
- the overall requestparams
- a typed parameter structure (unlike SolrParams which are all string values).public static FacetRequest parseOneFacetReq(SolrQueryRequest req, Map<String,Object> params)
SimpleFacets
.req
- the overall requestparams
- a typed parameter structure (unlike SolrParams which are all string values).public Map<String,AggValueSource> getFacetStats()
public Map<String,FacetRequest> getSubFacets()
public FacetRequest.RefineMethod getRefineMethod()
public boolean doRefine()
public boolean returnsPartial()
public boolean canProduceFromEmpty()
public void addStat(String key, AggValueSource stat)
public void addSubFacet(String key, FacetRequest facetRequest)
public final Object process(SolrQueryRequest req, DocSet domain) throws IOException
SimpleFacets
.IOException
public abstract FacetProcessor createFacetProcessor(org.apache.solr.search.facet.FacetContext fcontext)
public abstract FacetMerger createFacetMerger(Object prototype)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.