docs: @Override
      protected Integer doBase(String name, Object value) {
          if (value instanceof Number) {
              return ((Number) value).intValue();
          } else if (value instanceof Date) {
              return SimpleDateSerializer.timeInMillisToDay(((Date) value).getTime());
          } else if (value instanceof String) {
              try {
                  return Double.valueOf((String) value).intValue();
              } catch (NumberFormatException e) {
                  throw new IndexException("Field '{}' with value '{}' can not be parsed as integer", name, value);
              }
          }
          throw new IndexException("Field '{}' requires an integer, but found '{}'", name, value);
      }