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.
I work on a news publisher site with loads of content. We used to be able to customize the
ContentSearchcomponent's query andrenderItemTypein order to extract additional necessary information for content editors, particularly the publish date of a post. We did this by:queryFilterprop and adding the_linksand_embeddedfields (_embed=trueis already added by the component but without these other fields nothing is actually embedded)_embeddedproperty passed torenderItemTypeto customize the results items to display the post dateAfter this normalizeResults line was added, it is now impossible to reference any properties of the response items other than
id,subtype,title,type, andurl, which makesrenderItemTypealmost 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
_embeddedproperty 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.