update index, implement jointable