Search with the elasticsearch backend can throw UnboundLocalError local variable 'search_exception' referenced before assignment
The code at https://gitlab.com/mailman/hyperkitty/blob/master/hyperkitty/views/search.py#L93 only considers the whoosh and xapian backends and needs to be updated for elasticsearch.