When the index bundle of a longitudinal Dirac type operator is transversely smooth, we define its Chern character in Haefliger cohomology and relate it to the Chern character of the K—theory index. This result gives a concrete connection between the topology of the foliation and the longitudinal index formula. Moreover, the usual spectral assumption on the Novikov-Shubin invariants of the operator is improved.