search: activate the new structural search execution path
Created by: rvantonder
Stacked on #8366. This activates the new execution path for everything pulled out in #8366. This PR also refactors the code for readability but not functionality. Tests updated.
e2e tests must pass for this PR so that I know the functionality is preserved.
e2e tests pass, this change is safe.