  Neutrinos associated with solar flares (solar-flare neutrinos) provide
information on particle acceleration mechanisms during the impulsive phase of
solar flares. We searched using the Super-Kamiokande detector for neutrinos
from solar flares that occurred during solar cycles $23$ and $24$, including
the largest solar flare (X28.0) on November 4th, 2003. In order to minimize the
background rate we searched for neutrino interactions within narrow time
windows coincident with $\gamma$-rays and soft X-rays recorded by satellites.
In addition, we performed the first attempt to search for solar-flare neutrinos
from solar flares on the invisible side of the Sun by using the emission time
of coronal mass ejections (CMEs). By selecting twenty powerful solar flares
above X5.0 on the visible side and eight CMEs whose emission speed exceeds
$2000$ $\mathrm{km \, s^{-1}}$ on the invisible side from 1996 to 2018, we
found two (six) neutrino events coincident with solar flares occurring on the
visible (invisible) side of the Sun, with a typical background rate of $0.10$
($0.62$) events per flare in the MeV-GeV energy range. No significant
solar-flare neutrino signal above the estimated background rate was observed.
As a result we set the following upper limit on neutrino fluence at the Earth
$\mathit{\Phi}<1.1\times10^{6}$ $\mathrm{cm^{-2}}$ at the $90\%$ confidence
level for the largest solar flare. The resulting fluence limits allow us to
constrain some of the theoretical models for solar-flare neutrino emission.
