The OOTB Services and Servlet responses does not take care of link mapping for outbound URLs. As result of which , components such as Search Suggest and Search Results , Sling Model Exporters still contain long URLs . There should be some Link Rewriter Transformers or sling filters written for such cases to pass through these URLs via ResourceResolver.map(String resourcePath) .
Use-case:
SEO Improvements - Hide /content/project-name from Search results
Current/Experienced Behavior:
The URLs returned contain long URLS like /content/project-name/
Improved/Expected Behavior:
The URLs should be rewritten using some transformer or link rewriter or Sling Filter before returning response back
Environment Details (AEM version/service pack, any other specifics if applicable):
This has been reported to the engineering under the internal reference SITES-9533/GRANITE-43121. The product team will triage this request to verify feasibility based on the prioritization model. This post will be updated according to the Jira request status.