implemented span index
tests are green again
a test for the index
backport to 2.10.4 for spark successful