Currently, the search backend classes are instantiated manually where needed. This should be changed to using Symfony services.
The class name of the active search backend is stored in the config field search_type. phpBB ships with these 4 search backends:
In a new migration, the class names should be converted to these service names:
A new search.factory service should take care of instantiating the currently active search backend, and optionally allow instantiating any of the available search backends.