adjusting document indexes