Skip to content
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

feat: refactor bento search #480

Merged
merged 4 commits into from
May 25, 2023
Merged

Conversation

yetti
Copy link
Contributor

@yetti yetti commented May 24, 2023

Replaces the EDS gem with direct HTTP REST calls via the BentoSearch::EdsEngine class. BentoSearch::EdsEngine only hits the /edsapi/rest endpoint.

To be able to search publications, we need to hit /edsapi/publication endpoint. The BentoSearch::EdsPublicationEngine extends BentoSearch::EdsEngine to hit the publication endpoint. The response data returned is different, so BentoSearch::EdsPublicationEngine also tries to map useful data from the response.

In addition, BentoSearch::BlacklightEngine was also refactored to be more in line with the other search engiens provided with the bento_search gem.

⚠️ There is an issue with OpenSSL and the httpclient gem used by the search engines. httpclient uses very old certs by default, so to use the system certs, the SSL config needs to be reset to use the default SSL paths.

extend HTTPClientPatch::IncludeClient
include_http_client do |client|
  client.ssl_config.clear_cert_store
  client.ssl_config.cert_store.set_default_paths
end

See: nahi/httpclient#445

@yetti yetti requested a review from scott-yeadon May 24, 2023 07:13
@github-actions
Copy link
Contributor

Simplecov Report

Covered Threshold
96.95% 80%

@yetti yetti requested review from scott-yeadon and removed request for scott-yeadon May 24, 2023 21:53
@yetti yetti merged commit 54afb69 into main May 25, 2023
@yetti yetti deleted the feat/blac-315-refactor-bento-search branch May 25, 2023 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants