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.
Staging instance, all changes can be removed at any time
Flask 2.3 removed the deprecated before_first_request handler.
So ensure to initialize the search backend once after it was instantiated instead.