api/server: Fix AttributeError with flask 2.3
Flask 2.3 removed the deprecated before_first_request handler.
So ensure to initialize the search backend once after it was instantiated instead.
Flask 2.3 removed the deprecated before_first_request handler.
So ensure to initialize the search backend once after it was instantiated instead.