Skip to content

Refactor Opensearch interface to make filters more unified #5834

Closed

Description

@neilmb

Purpose

We want to make it easier to add filters to our site, but we're not sure how to do that.

Given above uncertainty, conducting research is needed to provide factual knowledge on future steps.

One week of effort has been allocated and once compete, findings will be demonstrated and specific future actions will be decided.

Acceptance Criteria

  • GIVEN we have many, many search filters
    AND we probably want to add more
    WHEN one week of work expires
    THEN we will have explored various code refactorings
    AND we will know which one we prefer
    AND we've made follow-on tickets if necessary

Background

Filters appear on our search pages, then express themselves as arguments in our /search API, then get passed in to our interface.py methods and then further on into our opensearch.py interface where they manifest as particular adjustments to the Opensearch queries that we run.

Currently, to add a new search filter we have to do the UI work on the search pages, and then plumb everything together by hand through all those layers. Can we do better and come up with a generic approach to filtering that makes it easier to express the filters we have and easier to add new filters in the future?

Sketch

Is there an object-oriented approach where we have something like a Filter class that can encapsulate how that filter shows up on the page, in an API, in our methods, and in an OpenSearch query?

Activity

  1. moved this to 📥 Queue in data.gov team boardon Apr 2, 2026
  2. moved this from 📥 Queue to Next Up in data.gov team boardon Apr 9, 2026
  3. moved this from Next Up to 📟 Sprint Backlog in data.gov team boardon Apr 23, 2026
  4. moved this from 📟 Sprint Backlog to 📥 Queue in data.gov team boardon May 28, 2026
  5. moved this from 📥 Queue to 📟 Sprint Backlog in data.gov team boardon Jun 18, 2026
  6. SueValente commented on Jun 24, 2026

    @SueValente
    Contributor

    simplify code. want to have class that has these things in it, and instance has been tasks to open search.

  7. moved this from 📟 Sprint Backlog (Top Priority) to 🏗 In Progress in data.gov team boardon Jul 8, 2026
  8. moved this from 🏗 In Progress to ✔ Done in data.gov team boardon Jul 13, 2026
  9. closed this as completedby moving to ✔ Done in data.gov team boardon Jul 13, 2026
  10. moved this from ✔ Done to 🗄 Closed in data.gov team boardon Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions