code: def _index_document(self, document, force=False):
          
          if force:
              self._delete(vid=document['vid'])
  
          writer = self.index.writer()
          writer.add_document(**document)
          writer.commit()
docs: Adds parition document to the index.