Skip to content

Feature/itk postgres search tuning - #327

Open
Elson9 wants to merge 3 commits into
mainfrom
feature/itk-postgres-search-tuning
Open

Feature/itk postgres search tuning#327
Elson9 wants to merge 3 commits into
mainfrom
feature/itk-postgres-search-tuning

Conversation

@Elson9

@Elson9 Elson9 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

APS-4734: add Postgres search ranking and snippet tuning to app-config.production.yaml.

DevHub already uses PostgreSQL and @backstage/plugin-search-backend-module-pg. This change only sets query-time options under the existing search: key:

  • highlightOptions — match-centred snippets, up to 2 fragments, shorter length (maxWords: 22, minWords: 10)
  • normalization: 1 — stop long documents from dominating ranking
  • fragmentDelimiter uses non-breaking spaces so PostgreSQL does not trim the spacing around ...

No plugin, schema, collator, or re-index changes. Auth, catalog, and existing collator config are untouched.

APS tasks included

  • APS-4734: Postgres search ranking and snippet tuning

Internal APS PR (merged into this feature branch): bcgov#1

Test evidence

  • Same search.pg values validated on the APS PoC (Gold dev) against cloud, security, parks, and API
  • After the first pass, snippet length was halved (maxWords 45 → 22, minWords 20 → 10) because results were too verbose
  • Before/after for the cloud query. LiDAR (a long dataset record) dropped from 1st to 3rd; Public cloud development guide moved from 3rd to 1st.

Before
before-cloud-3

After
after-cloud-3

Impacts

  • Config: new search.pg keys in app-config.production.yaml only. Local SQLite (app-config.yaml) ignores them.
  • Deployment: no Helm, schema, or re-index change. Query-time only; takes effect on the next image that includes this file.
  • Security / privacy: none. No new data stored or exposed.
  • Accessibility: uses the existing Backstage search highlight UI; no new colour or interaction pattern.
  • Operations: none beyond rolling the image. Collators and Postgres connection are unchanged.

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