1

We are using Tridion 9.5 and we have configured new content delivery feature using Elasticsearch technology. When content is published it is also pushed to elasticsearch. We have noticed in elasticsearch query result that component links and multimedia links are not resolving and showing with tcm ids in the search results is there any way to fix this?

5
  • Isn't this the same with regular content, except that you use the Linking API to resolve links? I would suspect you need a similar approach - when you get the results from ES you need to resolve the links before pushing it back to the browser/web server.
    – Nuno Linhares
    May 19, 2022 at 7:58
  • @NunoLinhares thanks for the reply but it is extra processing to resolve links is there any way we can resolve links while pushing data into elastic May 24, 2022 at 13:55
  • If would say that resolving links "offline" (during publishing/deploying) is potentially tricky. By the time you look at the search results (containing the resolved link), the link may resolve differently. For example, the linked Component may have been unpublished, so the link doesn't resolve at all anymore. If you simply pick up a resolved link value from the past, you can serve a broken link. May 30, 2022 at 13:12
  • I would also like to challenge the perception of "extra processing". Yes, there are additional steps, but link resolving with proper caching is very fast.
    – Nuno Linhares
    Jun 3, 2022 at 9:20
  • With Content Delivery search, you can still get back the content from the broker in addition to what's indexed. Wouldn't that get you any links resolved by CD logic? And maybe search results could/should be plain text without markup? I'll add an answer. :-) Jun 29, 2022 at 7:00

2 Answers 2

1

When searching over GraphQL, you can get the indexed search results down to specific fields as well as the published content from the broker (using brokerResult). See an example from Ben Middleton on the Sites 9.5 Search Functionality.

This would get you the resolved links (from the regular Component Presentations) but with a potential impact to performance.

However, you might opt to display plain text from the search results for either a paginated list or in some type-ahead search feature. So rather than showing links in the results, perhaps the UI would show the snippet of content and then let the visitor click on that to get to the full content in context.

0

Could you update your search result page to resolve the ID to a link - in the same way your DXA/other app would?

Or, if, when publishing, you have the ID - could you add/populate another metadata field with the 'static link' and use this in your ES display results?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.