Skip to content

feat(search): add query expansion for saved searches#2421

Merged
jcscottiii merged 2 commits intomainfrom
feat/saved-search-db-queries
Apr 21, 2026
Merged

feat(search): add query expansion for saved searches#2421
jcscottiii merged 2 commits intomainfrom
feat/saved-search-db-queries

Conversation

@jcscottiii
Copy link
Copy Markdown
Collaborator

@jcscottiii jcscottiii commented Apr 14, 2026

feat(search): add support for saved search expansion and custom sort order

This PR implements the expansion of saved searches (hotlists) within the search query parser and builder. It also adds support for sorting features based on their position in a specific saved search.

Key changes:

  • Added expandSavedSearches to recursively expand saved: and hotlist: identifiers in the search AST.
  • Implemented cycle detection and a maximum depth limit (2) for expansion to prevent DoS.
  • Added support for sorting by SearchIDOrderSort in FeatureSearchQueryBuilder.
  • Updated FeatureSearchFilterBuilder to handle hotlist subqueries efficiently, including AND/OR combinations of hotlists.
  • Added unit and integration tests for hotlist expansion and sorting.

Dependencies:

@jcscottiii jcscottiii force-pushed the feat/saved-search-db-system branch 2 times, most recently from 4fe8e5a to d190a29 Compare April 15, 2026 20:18
@jcscottiii jcscottiii force-pushed the feat/saved-search-db-queries branch 4 times, most recently from ad11d9c to abab831 Compare April 15, 2026 21:30
Copy link
Copy Markdown
Collaborator

@DanielRyanSmith DanielRyanSmith left a comment

Choose a reason for hiding this comment

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

LGTM 🙂

Comment thread lib/gcpspanner/feature_search_query.go
@jcscottiii jcscottiii force-pushed the feat/saved-search-db-system branch 2 times, most recently from 8dc3487 to cf1faab Compare April 21, 2026 14:08
Base automatically changed from feat/saved-search-db-system to main April 21, 2026 15:58
@jcscottiii jcscottiii force-pushed the feat/saved-search-db-queries branch from abab831 to f3d79c7 Compare April 21, 2026 17:44
@jcscottiii jcscottiii enabled auto-merge April 21, 2026 17:45
@jcscottiii jcscottiii added this pull request to the merge queue Apr 21, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 21, 2026
@jcscottiii jcscottiii added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit 2617773 Apr 21, 2026
8 checks passed
@jcscottiii jcscottiii deleted the feat/saved-search-db-queries branch April 21, 2026 19:28
@szy196 szy196 mentioned this pull request Apr 22, 2026
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.

3 participants