  In this article, we study Schr\"odinger operators on the real line, when the
external potential represents a dislocation in a periodic medium. We study how
the spectrum varies with the dislocation parameter. We introduce several
integer-valued indices, including Chern number for bulk indices, and various
spectral flows for edge indices. We prove that all these indices coincide,
providing a proof a bulk-edge correspondence in this case. The study is also
made for dislocations in Dirac models on the real line. We prove that 0 is
always an eigenvalue of such operators.
