[add] document index to store the document lengths