def METHOD_NAME(engine: model.Engine, start_date: datetime.datetime):
    sql = u'''SELECT package_id FROM tracking_summary
            where package_id!='~~not~found~~'
            and tracking_date >= %s;'''
    results = engine.execute(sql, start_date)
    package_ids: set[str] = set()
    for row in results:
        package_ids.add(row[u'package_id'])
    total = len(package_ids)
    not_found = 0
    click.echo(u'{} package index{} to be rebuilt starting from {}'.format(
        total, u'' if total < 2 else u'es', start_date)
    )
    from ckan.lib.search import rebuild
    for package_id in package_ids:
        try:
            rebuild(package_id)
        except logic.NotFound:
            click.echo(u'Error: package {} not found.'.format(package_id))
            not_found += 1
        except KeyboardInterrupt:
            click.echo(u'Stopped.')
            return
        except Exception as e:
            error_shout(e)
    click.echo(
        u'search index rebuilding done.' + (
            u' {} not found.'.format(not_found) if not_found else u''
        )
    )