-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎉 add data insights to algolia pages index #4541
base: master
Are you sure you want to change the base?
Conversation
@@ -105,15 +106,20 @@ async function generateWordpressRecords( | |||
const getPostTypeAndImportance = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to rewrite the PageType
type to use the OwidGdocType
enum so that it would be compatible with getCanonicalUrl
which we now need to be able to link to data insights correctly on the search page, so I had to refactor these 3 functions that each had a pattern match statement.
e69cbaf
to
1595b38
Compare
1595b38
to
79c6628
Compare
79c6628
to
dbf649b
Compare
@Marigold okay so yeah, it is just exceeding the timeout duration - indexing everything takes around 20 minutes now If/when we drop the ExplorerViews index (which is redundant now that we have ExplorerViewsAndCharts) we'll drop 6 minutes or so, but for now maybe the easiest thing is to increase the limit. |
Fair enough! I've increased the timeout to 60 mins (here it is if you want to further increase it). This will apply only to |
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2025-02-25 08:54:24 UTC |
Hey @mlbrgl - I'm requesting a review from you on this, but it's also an invitation to get it over the finish line this cooldown if you'd like 🙂 I've tagged Marwa in the P&D channel to make sure the design's okay |
Resolves #4507
Figma
Adds Data Insights as a supported gdoc type in the
indexPagesToAlgolia
script.Most of this PR's diff comes from updating the union type
PageType
to use theOwidGdocType
enum so that I could callgetCanonicalURL
in the search panel (to correctly prefix the slug with/data-insights/
)I also added a slightly complicated
getFirstBlockOfType
implementation because my first attempt at this change needed to get both the first image and first paragraph. It's less essential for the PR on the whole, now, but I think will still be a useful util to keep around.