Loading TOC...


   $configuration as object
) as BucketDefinition


Returns a list of bounds for grouping by subdividing an interval either with a fixed step size or a fixed number of division buckets within the min and max boundary values as input for the ValuesSearch.groupInto or FacetDefinition.groupInto method.

$configurationThe options for generating the buckets.

Usage Notes

The configuration options specify the following parameters:
The smallest bound, which provides the ceiling for the first bucket. Required.
The largest bound, which provides the floor for the last bucket. Required.
The size of the buckets between the min and max; to make all buckets equal, the difference between the min and max should be divisible by an integer to yield the step. Exclusive with respect to divs, one of which is required.
The number of buckets between the min and max. Exclusive with respect to step, one of which is required.
A boolean specifying whether to assign names to buckets. Optional.

Empty buckets are thrown away by default. The cost of throwing away hundreds of empty buckets is smaller than the cost of looking up a minimum or maximum in a range index, so it can yields better performance to overestimate the min and max instead of determining them exactly.

See Also


// Define a set of buckets over dates, where each bucket covers one month
  min: xs.date('2015-01-01'), 
  max: xs.date('2015-12-31'), 
  step: xs.yearMonthDuration('P1M')


    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy