Package org.apache.solr.analytics.facet
Class RangeFacet
- java.lang.Object
-
- org.apache.solr.analytics.facet.AnalyticsFacet
-
- org.apache.solr.analytics.facet.AbstractSolrQueryFacet
-
- org.apache.solr.analytics.facet.RangeFacet
-
public class RangeFacet extends AbstractSolrQueryFacet
A facet that groups data by a discrete set of ranges.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.analytics.facet.AbstractSolrQueryFacet
AbstractSolrQueryFacet.FacetValueQueryExecuter
-
-
Field Summary
Fields Modifier and Type Field Description protected String
end
protected SchemaField
field
protected List<String>
gaps
protected boolean
hardEnd
protected EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude>
include
protected EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther>
others
protected String
start
-
Fields inherited from class org.apache.solr.analytics.facet.AnalyticsFacet
collectionManager, expressionCalculator, name, reductionData
-
-
Constructor Summary
Constructors Constructor Description RangeFacet(String name, SchemaField field, String start, String end, List<String> gaps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createFacetValueExecuters(org.apache.lucene.search.Query filter, SolrQueryRequest queryRequest, Consumer<AbstractSolrQueryFacet.FacetValueQueryExecuter> consumer)
Returns the set ofAbstractSolrQueryFacet.FacetValueQueryExecuter
s, one for each facet value, through the given consumer.String
getEnd()
SchemaField
getField()
List<String>
getGaps()
EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude>
getInclude()
EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther>
getOthers()
String
getStart()
boolean
isHardEnd()
void
setHardEnd(boolean hardEnd)
void
setInclude(EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude> include)
void
setOthers(EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther> others)
-
Methods inherited from class org.apache.solr.analytics.facet.AnalyticsFacet
createOldResponse, createResponse, exportFacetValue, exportShardData, getName, importFacetValue, importShardData, setExpressionCalculator, setReductionCollectionManager
-
-
-
-
Field Detail
-
field
protected final SchemaField field
-
start
protected final String start
-
end
protected final String end
-
hardEnd
protected boolean hardEnd
-
include
protected EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude> include
-
others
protected EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther> others
-
-
Method Detail
-
createFacetValueExecuters
public void createFacetValueExecuters(org.apache.lucene.search.Query filter, SolrQueryRequest queryRequest, Consumer<AbstractSolrQueryFacet.FacetValueQueryExecuter> consumer)
Description copied from class:AbstractSolrQueryFacet
Returns the set ofAbstractSolrQueryFacet.FacetValueQueryExecuter
s, one for each facet value, through the given consumer.Each of these executors will be executed after the streaming phase in the
AnalyticsDriver
.- Specified by:
createFacetValueExecuters
in classAbstractSolrQueryFacet
- Parameters:
filter
- the overall query representing the documents being used for the analytics requestqueryRequest
- the queryRequestconsumer
- the consumer of each facet value's executer
-
getStart
public String getStart()
-
getEnd
public String getEnd()
-
getInclude
public EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude> getInclude()
-
setInclude
public void setInclude(EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude> include)
-
isHardEnd
public boolean isHardEnd()
-
setHardEnd
public void setHardEnd(boolean hardEnd)
-
getOthers
public EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther> getOthers()
-
setOthers
public void setOthers(EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther> others)
-
getField
public SchemaField getField()
-
-