  Stellar flares cannot be spatially resolved, which complicates ascertaining
the physical processes behind particular spectral signatures. Due to their
proximity to Earth, solar flares can serve as a stepping stone for
understanding their stellar counterparts, especially when using a Sun-as-a-star
instrument and in combination with spatially resolved observations. We aim to
understand the disk-integrated spectral behaviors of a confined X2.2 solar
flare and its eruptive X9.3 successor as measured by HARPS-N. The behavior of
multiple photospheric and chromospheric spectral lines are investigated by
means of activity indices and contrast profiles. A number of different
photospheric lines were also investigated by means of equivalent widths, and
radial velocity measures, which are then related to physical processes directly
observed in high-resolution observations made with the Swedish 1-meter Solar
Telescope and SDO Our findings suggest a relationship between the evolving
shapes of contrast profile time and the flare locations, which assists in
constraining flare locations in disk-integrated observations. In addition, an
upward bias was found in flare statistics based on activity indices derived
from the Ca II H & K lines. In this case, much smaller flares cause a similar
increase in the activity index as that produced by larger flares.
H$\alpha$-based activity indices do not show this bias and are therefore less
susceptible to activity jitter. Sodium line profiles show a strongly asymmetric
response during flare activity, which is best captured with a newly defined
asymmetrical sodium activity index. A strong flare response was detected in Mn
I line profiles, which is unexpected and calls for further exploration.
Intensity increases in H$\alpha$, H$\beta$, and certain spectral windows of AIA
before the flare onset suggest their potential use as short-term flare
predictors.
