You are here

function apachesolr_date_gap_drilldown in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 apachesolr.module \apachesolr_date_gap_drilldown()
  2. 6.2 apachesolr.module \apachesolr_date_gap_drilldown()

Return the next smaller date gap.

Parameters

$gap: A gap.

Return value

The next smaller gap, or NULL if there is no smaller gap.

1 call to apachesolr_date_gap_drilldown()
apachesolr_search_date_range in ./apachesolr_search.module

File

./apachesolr.module, line 1019
Integration with the Apache Solr search application.

Code

function apachesolr_date_gap_drilldown($gap) {
  $drill = array(
    'YEAR' => 'MONTH',
    'MONTH' => 'DAY',
    'DAY' => 'HOUR',
  );
  return isset($drill[$gap]) ? $drill[$gap] : NULL;
}