'Return a dict with the index and doc_type keys to use for this request,
using the \'doc_type\' GET parameter.
Valid `doc_type` parameters: \'extension\', \'webapp\' and \'website\'. If
no parameter is passed or the value is not recognized, default to
\'webapp\', \'website\'.'

def get_doc_types_and_indices(self):

    cls = self.__class__
    requested_doc_types = self.request.GET.get('doc_type', '').split(',')
    filtered_names_and_indices = [cls.mapping_names_and_indices[key] for key in cls.mapping_names_and_indices if (key in requested_doc_types)]
    if (not filtered_names_and_indices):
        filtered_names_and_indices = cls.get_default_indices()
    return {key: [item[key] for item in filtered_names_and_indices] for key in ['doc_type', 'index']}
