def as_query(self): if self.field_name == 'time': return { self.field_name: _time_to_search_dims( [self.low_value.value, self.high_value.value]) } else: return { self.field_name: Range(self.low_value.as_value(), self.high_value.as_value()) }
def single_date(self, date): return _time_to_search_dims(date)
def date_pair(self, start, end): return _time_to_search_dims((start, end))
def as_query(self): return { self.field_name: _time_to_search_dims([self.low_value.value, self.high_value.value]) }