Specify custom intervals for ranged refiners
The Range Facets tuning stage allows you to specify custom ranges for dates and numeric refiners, such as size, LastModifiedTime, etc. This lets your users filter their search results to return items that fall in between the selected interval.
To get the expected results, this stage must be added to both the Query and Results tuning stages:
-
The Range Facets results tuning stage must be added after the Property Mapper tuning stage.
-
The Range Facets query tuning stage must be added before the Property Mapper tuning stage.
-
For more information on adding a tuning stage, see Add a User Experience Tuning Stage
SmartHub supports configuration with both overlapping and non-overlapping range intervals. For overlapping intervals, Upland BA Insight recommends configuring the refiner with radio buttons to avoid confusion for your users. For non-overlapping intervals, you can enable multiple selection in the refiner, allowing users to refine their search with greater flexibility and accuracy. Refer to the following examples for more information:
Non-overlapping intervals:
<RangeFacetsConfig>
<Facet name="Size" isDateInterval = "false">
<Intervals minLabel="Less than 200 Kb" maxLabel = "More than 500 Kb">
<Interval startPoint="100" endPoint="200">100-200 Kb</Interval>
<Interval startPoint="200" endPoint="500">200-500 Kb</Interval>
</Intervals>
</Facet>
<Facet name="LastModifiedTime" isDateInterval = "true">
<Intervals minLabel="+3 years" maxLabel = "Today">
<Interval startPoint="-1065" endPoint="-7">1 week - 3 years</Interval>
<Interval startPoint="-7" endPoint="0">1 week - today</Interval>
</Intervals>
</Facet>
<Facet name="Date" isDateInterval = "false">
<Intervals minLabel="Before 2015" maxLabel = "After 2018">
<Interval startPoint="2015-01-10" endPoint="2017-01-10">2015-2016</Interval>
<Interval startPoint="2017-01-10" endPoint="2018-01-10">2016-2017</Interval>
</Intervals>
</Facet>
</RangeFacetsConfig>
Overlapping intervals
<RangeFacetsConfig>
<Facet name="date" isDateInterval="true">
<Intervals minLabel="Older than 5 Years" maxLabel="Today">
<Interval startPoint="-7" endPoint="0">Last Week</Interval>
<Interval startPoint="-30" endPoint="0">Last Month</Interval>
<Interval startPoint="-180" endPoint="0">Last 6 Months</Interval>
<Interval startPoint="-365" endPoint="0">Last Year</Interval>
<Interval startPoint="-1825" endPoint="0">Last 5 years</Interval>
</Intervals>
</Facet>
<Facet name="Size" isDateInterval="false">
<Intervals minLabel="Less than 1 Mb" maxLabel="More than 50 Mb">
<Interval startPoint="1000" endPoint="5000">1-5 Mb</Interval>
<Interval startPoint="1000" endPoint="10000">1-10 Mb</Interval>
<Interval startPoint="1000" endPoint="50000">1-50 Mb</Interval>
</Intervals>
</Facet>
</RangeFacetsConfig>