Creating back index for document