fix haystach index setup for 2.x
merge conflict