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

Allow manually calling search-api-v2 #3156

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Allow manually calling search-api-v2 #3156

merged 1 commit into from
Sep 12, 2023

Conversation

csutter
Copy link
Contributor

@csutter csutter commented Sep 12, 2023

As a first step to building the integration with search-api-v2, allow finder-frontend to call it if and only if an explicit use_v2 query parameter is supplied.

  • Bump gds-api-adapters to get new adapter for search-api-v2
  • Add Services#search_api_v2
  • Update Search::Query to call search-api-v2 if use_v2 parameter is present and truthy (accoring to ActiveModel::Type::Boolean)

@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3156 September 12, 2023 13:42 Inactive
Copy link
Contributor

@leenagupte leenagupte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -99,5 +103,9 @@ def fetch_search_response(content_item)
end
end
end

def use_v2_api?
ActiveModel::Type::Boolean.new.cast(filter_params["use_v2"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice!

Gemfile.lock Outdated Show resolved Hide resolved
As a first step to building the integration with `search-api-v2`, allow
`finder-frontend` to call it if and only if an explicit `use_v2` query
parameter is supplied.

- Bump `gds-api-adapters` to get new adapter for `search-api-v2`
- Add `Services#search_api_v2`
- Update `Search::Query` to call `search-api-v2` if `use_v2` parameter
  is present and truthy (accoring to `ActiveModel::Type::Boolean`)
@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3156 September 12, 2023 14:24 Inactive
@leenagupte leenagupte merged commit 0537314 into main Sep 12, 2023
7 checks passed
@leenagupte leenagupte deleted the search-api-v2 branch September 12, 2023 15:33
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.

3 participants