Feature/itk postgres search tuning - #327
Open
Elson9 wants to merge 3 commits into
Open
Conversation
APS-4734: tune Postgres search ranking and snippets
danilomeireles
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 existingsearch:key:highlightOptions— match-centred snippets, up to 2 fragments, shorter length (maxWords: 22,minWords: 10)normalization: 1— stop long documents from dominating rankingfragmentDelimiteruses 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
Internal APS PR (merged into this feature branch): bcgov#1
Test evidence
search.pgvalues validated on the APS PoC (Gold dev) againstcloud,security,parks, andAPImaxWords45 → 22,minWords20 → 10) because results were too verbosecloudquery. LiDAR (a long dataset record) dropped from 1st to 3rd; Public cloud development guide moved from 3rd to 1st.Before

After

Impacts
search.pgkeys inapp-config.production.yamlonly. Local SQLite (app-config.yaml) ignores them.