You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work on a news publisher site with loads of content. We used to be able to customize the ContentSearch component's query and renderItemType in order to extract additional necessary information for content editors, particularly the publish date of a post. We did this by:
Using the queryFilter prop and adding the _links and _embedded fields (_embed=true is already added by the component but without these other fields nothing is actually embedded)
Utilizing the _embedded property passed to renderItemType to customize the results items to display the post date
After this normalizeResults line was added, it is now impossible to reference any properties of the response items other than id, subtype, title, type, and url, which makes renderItemType almost completely useless for our purposes.
I'm not sure what the correct answer is here, but I would love to at least be able to include the _embedded property as part of the normalized results type since that is a standard part of the search endpoint schema. It would be a nice bonus to be able to make use of custom fields added to the search results schema, but that would probably be harder to account for.
Looks like #373 was meant to address this kind of problem but the effort stalled due to the implementation method. I think we already have (or had) enough ways to alter the query and results item render, the normalized results just needs to be tweaked. I might open a PR here in a bit.
Activity
cr0ybot commentedon Sep 15, 2025
Looks like #373 was meant to address this kind of problem but the effort stalled due to the implementation method. I think we already have (or had) enough ways to alter the query and results item render, the normalized results just needs to be tweaked. I might open a PR here in a bit.