The main use of the entity-search-callback was the wbsearchentities API module, but this is now using the new controller approach (see T413961). We want to avoid having multiple mechanism to do the same thing, so we should remove entity-search-callback from entity type definitions.
Before entity-search-callback can be removed, we need to first adjust all places that still make use of it or TypeDispatchingEntitySearchHelper. The required adjustments depend on the feature that uses them:
- search features only involving a single entity type should not use TypeDispatchingEntitySearchHelper and instead use the type-specific service. Examples:
- item disambiguation page (item-only)
- PropertySuggester GetSuggestions (property-only)
- search features actually requiring type dispatching use the controller mechanism. Examples:
- QuerySearchEntities. This might be able to reuse the wbsearchentities controller since it's the same functionality as wbsearchentities, just packaged as a query module
- searchEntities maintenance script. Ask around if anyone uses this. Remove if not, use a controller otherwise.
What to remove:
- the entries from all *.entitytypes.php files
- the TypeDispatchingEntitySearchHelper class and corresponding service definition
- callbacks "service" from entity type definition wiring file
- the constant from EntityTypeDefinitions
- the corresponding documentation from entitytypes.md