fix(search-service): fix global search issue#2561
Conversation
e242a42 to
8e3d9eb
Compare
There was a problem hiding this comment.
Pull request overview
Fixes PostgreSQL global-search token sanitization so search terms containing dots (e.g., Deal 10.1) are preserved instead of being split/removed, and adds unit coverage for the updated sanitization behavior.
Changes:
- Update
PsqlQueryBuilder._formatAndSanitizeto allow.in tokens and strip unsafeto_tsqueryoperators. - Add unit tests covering dotted terms (decimals, project names, IPs) and mixed punctuation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| services/search-service/src/classes/psql/query.builder.ts | Adjusts match sanitization/tokenization to preserve dots for PostgreSQL full-text search queries. |
| services/search-service/src/tests/unit/psql/query.builder.unit.ts | Adds targeted unit tests for _formatAndSanitize with dotted search terms and mixed characters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fix global search issue GH-2553
SonarQube reviewer guideSummary: Add comprehensive unit tests and improve the Review Focus: The core logic change in Start review at:
|





fix global search issue
GH-2553
Description
In Global Search, users are unable to see search results when searching for names containing . (dot), for example: Deal 10.1.
The issue originates from the _formatAndSanitize method in query.builder.ts, which is used by search.provider.ts.
Type of change
Checklist: