Issue #3532607 by robertoperuzzo, lussoluca: Refactor the code to handle the Federated/Multi-Index Search
Closes #3532607