code: def list_models(self):
          
          try:
              count = self.es.count(index=self.index_name,
                                    doc_type=self.DOC_TYPE, q='*')['count']
              from_ = 0
              while from_ < count:
                  ret = self.es.search(index=self.index_name,
                                       doc_type=self.DOC_TYPE, q='*',
                                       size=self.BATCH_SIZE, from_=from_,
                                       _source=self.PACKAGE_FIELDS)
                  for hit in ret.get('hits', {}).get('hits', []):
                      yield hit['_source']['id']
                  from_ += self.BATCH_SIZE
          except NotFoundError:
              return
docs: List all available models in the DB
          :return: A generator yielding strings (one per model)