def addDocument(self, doc):
		lbl = doc.get('label')
		if lbl and len(lbl) > 1010:			# indexed, cannot be > 1024 in total
			doc['fullLabel'] = lbl
			doc['label'] = lbl[:1010]
		
		super().addDocument(doc)
		if len(self.documents) > 50:
			self._insertAndClear()
dataset/ETHPy150Open chb/py-umls/rxnorm_link_run.py/MongoDocHandler.addDocument/original