def METHOD_NAME(domain, doc_type, chunk_size=10000,
                                      database=None, startkey=None, startkey_docid=None):
    if not database:
        database = get_db_by_doc_type(doc_type)
    view_kwargs = {
        'reduce': False,
        'startkey': startkey if startkey else [domain, doc_type],
        'endkey': [domain, doc_type, {}],
        'include_docs': False
    }
    if startkey_docid:
        view_kwargs.update({
            'startkey_docid': startkey_docid
        })
    for doc in paginate_view(
            database,
            'by_domain_doc_type_date/view',
            chunk_size,
            **view_kwargs):
        yield doc['id']