def get_doctype_stats(index):
 stats = {}
 from kitsune.search.models import get_mapping_types
 for cls in get_mapping_types():
  if (cls.get_index() == index):
   s = S(cls).indexes(index)
   stats[cls.get_mapping_type_name()] = s.count()
 return stats

def get_doctype_stats ( index ) : stats = { } from kitsune . search . models import get_mapping_types for cls in get_mapping_types ( ) : if ( cls . get_index ( ) == index ) : s = S ( cls ) . indexes ( index ) stats [ cls . get_mapping_type_name ( ) ] = s . count ( ) return stats
returns a dict of name -> count for documents indexed .