elasticsearch/elasticsearch — pull request #6216 by ctrimble (2014-05-18 00:26:30+00:00)
Title: Fix offsets in DateHistogramBuilder

This PR fixes #5586 by correcting the behavior of the current `preOffset` and `postOffset` methods in DateHistogramBuilder and adds new versions of these methods that take `DateHistogram.Interval`. It is patterned after the interval property that already exists in this class.

This PR is an alternative to #5587. That PR removes the current methods and replaces them with `String` based fields. This seems inconsistent with the other methods in the class and causes a change to the contract currently established by DateHistogramBuilder.