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

Add serving configs to Search Admin #1373

Merged
merged 3 commits into from
Feb 12, 2025
Merged

Add serving configs to Search Admin #1373

merged 3 commits into from
Feb 12, 2025

Conversation

csutter
Copy link
Contributor

@csutter csutter commented Feb 12, 2025

Discovery Engine serving config(uration)s are individual endpoints on an engine that can be used for querying. Their main purpose is to have controls attached which modify their behaviour, and each of an engine's serving configs can have zero-to-many of that engine's controls attached. Having several serving configs means we can test out different sets of controls and how they affect search results.

This adds a ServingConfig model representing a serving config on Discovery Engine, and some initial UI for it.

In order to keep track of the different types of serving config we have, a "use case" enum tracks what each serving config is for:

  • live serving configs are used somewhere in our search stack to provide results to the public
  • preview serving configs are for use by Search Admin users to test new configurations (for example, when adding new controls)
  • system serving configs are for internal programmatic use and cannot be modified through the Search Admin UI (for example, we have a "raw" serving config to test how the engine behaves without any controls)

As we cannot currently create or delete serving configs through the Discovery Engine Ruby client, initial creation of three serving configs has been done in govuk-infrastructure 1 and we use a Rake task to create the model records on this end. Depending on whether these three are enough for the long term, we may or may not want to add the ability to create, edit, and delete serving configs to Search Admin in the future.

Screenshots

image image

This represents a serving config(uration) on Discovery Engine, which is
an endpoint on an engine that can be used for querying. The main purpose
of serving configs is to have controls attached which modify their
behaviour, and each of an engine's serving configs can have zero-to-many
of that engine's controls attached. Having several serving configs means
we can test out different sets of controls and how they affect search
results.

Serving configs have one of three use cases:
- `live` serving configs are used somewhere in our search stack to
  provide results to the public
- `preview` serving configs are for use by Search Admin users to test
  new configurations (for example, when adding new controls)
- `system` serving configs are for internal programmatic use and cannot
  be modified through the Search Admin UI (for example, we have an
  "empty" serving config to test having no controls at all)

Serving configs also have a display name and remote resource identifier
(like other Discovery Engine resources).

As we cannot currently create or delete serving configs through the
Discovery Engine Ruby client, initial creation of three serving configs
has been done in `govuk-infrastructure` [1] and we use a Rake task to
create the model records on this end. Depending on whether these three
are enough for the long term, we may or may not want to add the ability
to create, edit, and delete serving configs to Search Admin in the
future.

[1]: alphagov/govuk-infrastructure#1680
As these aren't currently user-manageable in Search Admin, we don't need
any UI to create, edit, or delete them.
This allows users to preview the results from a serving config on Finder
Frontend using the `debug_serving_config` parameter.
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.

I've tried this out locally and it looks good 👍

@csutter csutter merged commit 1f5c17e into main Feb 12, 2025
10 checks passed
@csutter csutter deleted the sconf branch February 12, 2025 16:58
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