def get_doc(self):
        doc = {}
        MAP = {
            'int': self._get_random_int,
            'tdate': self._get_random_solr_date,
            'text_en': self._get_random_string,
            'string': self._get_random_string,
            'id_string': self._get_id_string,
            'facet_string': self._get_facet_string
        }
        for field in self.fields:
            try:
                doc[field['name']] = MAP[field['type']]()
            except __HOLE__:
                doc[field['name']] = MAP['string']()
        return doc
dataset/ETHPy150Open moonlitesolutions/SolrClient/test/RandomTestData.py/RandomTestData.get_doc