-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Copy/pasted from Slack:
Images for each item (as appear in the list view in Figma) will be trickier though. The map search just grabs the content_preview_url attribute of the first media record that comes in through the related media FairData endpoint. If we're relying on the Typesense hit object alone, we have no structured way of doing anything similar aside from iterating recursively through nested properties until we find a content_preview_url property somewhere (and then I'm not entirely sure if that field is actually indexed).
To make it easier to work with cover images outside of the CDP map search, we should add a new preview_image field to the search JSON for all model types. It should be populated similarly to how we fetch the cover image on CDP - get the content_preview_url of the first related media record, leaving it nil if there are no related media records.