I’m using RefineryCMS 4 which uses acts-as-indexed under the hood for search capabilities. It’s not exactly Elastic, but it’s… serviceable. However, recently I’ve started integrating an external API (research project data) as a data source for some pages. I’m doing the API calls in the view because the API is stable and has a very good uptime, and storing it in my own database would be kinda pointless. But this means it’s not indexed. (I cache the result for three days, which works well.)
For the visitors, what content is from the CMS and what’s from the API is impossible to guess, but Refinery’s data is indexed and frontend-searchable, while the data from the API isn’t. (I’m only using Net::HTTP to get the JSON; no fancy stuff.)
Is there a way to do this without writing my own model and controller and do some kind of background job for the data itself? I’d be happy not storing this data in my own database and just rely on api calls from the view and then caching the results, although it’s probably not considered a good practice.
Thanks for any help!