class BookingDaoESImp extends BaseDaoESImp implements BookingDao {

    @Override
    public Map<Day, List<BookingBucket>> getBookingBuckets(Set<Day> days) throws IOException
    {
        BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder();
        SearchRequest searchRequest;
        List<String> dayStrs = new ArrayList(Day.getDayStringTreated(days, "-"));
        append(boolQueryBuilder, dayStrs, "day");

        SearchSourceBuilder sourceBuilder = new SearchSourceBuilder().query(boolQueryBuilder).size(MAX_BOOKING_READ_PER_DAY);
        searchRequest = new SearchRequest(this.bookingBucketsIndex).source(sourceBuilder);
        ESResponse esResponse = esclient.search(searchRequest);

        Map<Day, List<BookingBucket>> result = new HashMap<>();
        if (esResponse == null)
        {
            LOGGER.error("response is null");
            return result;
        }

        List docs = (List) ((Map) (esResponse.getSourceMap().get("hits"))).get("hits");
        for (Object doc : docs)
        {
            Map docMap = (Map) doc;
            BookingBucket bookingBucket = buildBookingBucket(docMap);
            if (bookingBucket == null)
            {
                continue;
            }
            Day day = new Day(bookingBucket.getDay());
            if (!result.containsKey(day))
            {
                result.put(day, new ArrayList<BookingBucket>());
            }
            result.get(day).add(bookingBucket);
        }
        return result;
    }

    public  BookingDaoESImp();
    public  BookingDaoESImp(Properties properties);

}