Skip to content

CROSSLINK-234 Add full text search#489

Merged
JanisSaldabols merged 9 commits intomainfrom
CROSSLINK-234
Mar 27, 2026
Merged

CROSSLINK-234 Add full text search#489
JanisSaldabols merged 9 commits intomainfrom
CROSSLINK-234

Conversation

@JanisSaldabols
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 26, 2026 12:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds full-text search support for patron requests by persisting searchable content in the DB and exposing new CQL fields for filtering/listing.

Changes:

  • Add items (JSONB) and language (regconfig) to patron_request, plus a search tsvector with a GIN index and triggers to keep it updated.
  • Extend CQL filtering to support title, patron, and cql.serverChoice backed by the search column.
  • Expose patron-request items in the API response model and update tests/OpenAPI/docs accordingly.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
broker/migrations/021_add_items_to_pr.up.sql Adds items, search, language, triggers, index, and recreates patron_request_search_view.
broker/migrations/021_add_items_to_pr.down.sql Rollback for migration 021 (drops triggers/index/columns/view).
broker/patron_request/db/prmodels.go Introduces PrItem model and custom JSON time parsing for items JSONB.
broker/sqlc/sqlc.yaml Overrides sqlc mapping to decode items JSONB into []PrItem.
broker/sqlc/pr_schema.sql Updates sqlc schema with new items and language columns.
broker/sqlc/pr_query.sql Includes language/items in list query; adds language to create/update queries.
broker/patron_request/db/prcql.go Adds CQL fields title, patron, and cql.serverChoice (tsvector).
broker/patron_request/db/prrepo.go Maps newly selected Language and Items onto PatronRequest results.
broker/patron_request/api/api-handler.go Includes items in PatronRequest API responses; sets Language on creation.
broker/patron_request/service/message-handler.go Ensures Language is persisted during request creation and updates.
broker/patron_request/service/action.go Ensures Language is preserved when updating patron requests.
broker/patron_request/service/action_test.go Updates mock repo behavior to account for new params fields.
broker/oapi/open-api.yaml Documents items on PatronRequest and new CQL filter fields.
broker/README.md Documents LANGUAGE env var used for tsvector/CQL search language.
broker/test/patron_request/api/api-handler_test.go Adds coverage for cql.serverChoice and updates CRUD query expectations.
broker/test/patron_request/db/prrepo_test.go Updates DB tests to set Language on created records.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

@JanisSaldabols JanisSaldabols requested a review from jakub-id March 27, 2026 09:26
@JanisSaldabols JanisSaldabols merged commit b60f1a9 into main Mar 27, 2026
5 checks passed
@JanisSaldabols JanisSaldabols deleted the CROSSLINK-234 branch March 27, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants