mitodl / ocw-hugo-themes

A Hugo theme for building OCW websites
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

update search #1313

Open abeglova opened 9 months ago

abeglova commented 9 months ago

What are the relevant tickets?

closes https://github.com/mitodl/ocw-hugo-themes/issues/1294

Description (What does it do?)

This pr updates the search to use the new open apis.

It uses the changes to course-search utils from https://github.com/mitodl/course-search-utils/pull/64

How can this be tested?

Run mit-open

Set COURSE_SEARCH_API_URL=http://localhost:8063/api/v1/learning_resources_search/ CONTENT_FILE_SEARCH_API_URL=http://localhost:8063/api/v1/content_file_search/

Run yarn start www

Go to http://localhost:3000/search/ and click around. Everything should work as expected. The urls will be a little different than the existing ui

github-actions[bot] commented 9 months ago

Netlify Deployments:
www: https://ocw-hugo-themes-www-pr-1313--ocw-next.netlify.app/
Course v2: https://ocw-hugo-themes-course-v2-pr-1313--ocw-next.netlify.app/

ChristopherChudzicki commented 9 months ago

Also: With the levelsMap change, I think you're only using types from the generated code. We could move that generated code to course-search-utils, and just export the relevant types from there. (With the goal that the generated could in course-search-utils should be replaced via mitodl/open-api-cleints soon.)

pdpinch commented 2 months ago

@ChristopherChudzicki @abeglova what should we do with this PR? I'm not really clear on what it does.