As reported at #2159883: Date facets not displayed when the configured granularity is larger than the calculated granularity, date facets are not displayed when the minimum granularity set in the Facet's settings page is larger than the granularity, or date gap, than is calculated by facet API.

For example, Let's say you have two nodes, one published on 12-30-2013 and on published on 01-02-2014, and you don't want facets to drill down below the year. If you configure the minimum granularity to a "Year" in the facet's display page, the facet won't display since the calculated granularity is "Day".

The "fix" in the referenced Facet API improves the API so that gaps lower than the minimum granularity are not returned by the API function, however the implementing module's query type plugin for Dates must explicitly pass the setting to the API function in order to fix the bug.

Comments

cpliakas’s picture

Status: Active » Needs review
StatusFileSize
new1.29 KB

The attached patch uses the functionality in Facet API added in the patch at #2159883-6: Date facets not displayed when the configured granularity is larger than the calculated granularity.

It is backwards-compatible with Facet API, meaning that it doesn't break when used with versions of Facet API that have not incorporated the change.

cpliakas’s picture

This Facet API change is now in the 7.x-1.5 release.

cpliakas’s picture

Issue summary: View changes