Skip to content

Add Search2 pagination and enable browse-all results for empty keyword#268

Open
ywkim312 wants to merge 3 commits into
devfrom
feature/266-add-pagination-to-search2-results-page
Open

Add Search2 pagination and enable browse-all results for empty keyword#268
ywkim312 wants to merge 3 commits into
devfrom
feature/266-add-pagination-to-search2-results-page

Conversation

@ywkim312

@ywkim312 ywkim312 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Closes: #230 #266

Description

Summary

  • Add pagination to Search2 results with URL-synced state:
    • page and limit query params
    • page size selector
    • page navigation controls
    • correct offset-based fetching and result range display
  • Keep pagination behavior consistent by resetting to page 1 when search inputs change:
    • keyword text
    • exact match toggle
    • resource type
    • active facet filters
    • page size
  • Enable “browse-all” behavior for empty keyword searches:
    • when search text is empty, execute a no-keyword query
    • show initial/full results (subject to limit) instead of blank/no-results state
  • Ensure initial route load executes once even when query state matches defaults, so empty-keyword landing is populated.

User-facing behavior changes

  • Search2 now shows page navigation and X / page controls.
  • URL reflects paging state and supports deep-linking/reload/back-forward for paged results.
  • Opening Search2 with no keyword now shows results (browse mode), not an empty page.

Technical notes

  • Pagination and URL sync logic is managed in FilterStateManager + useSearch.
  • Result header now renders paging controls and range text (e.g., Showing 101-150 of N results).
  • Empty-keyword execution is implemented as behavior gating only; no replacement of existing optimized query-building architecture.

Files changed

  • client/src/services/FilterStateManager.js
  • client/src/composables/useSearch.js
  • client/src/components/facetsearch/ResultHeader2.vue
  • client/src/components/facetsearch/Search2.vue

Test plan

  • Open #/Search2?q=water and verify pagination controls appear.
  • Change page and confirm URL updates with page and results update accordingly.
  • Change page size and confirm URL limit updates and page resets to 1.
  • Apply/remove filters and verify page resets to 1.
  • Open #/Search2 (empty keyword) and verify results are shown (not blank/no-results).
  • Reload on a deep link (e.g., #/Search2?q=water&page=3&limit=50) and verify state and results are restored.

@ywkim312 ywkim312 linked an issue Jun 26, 2026 that may be closed by this pull request
@ywkim312 ywkim312 self-assigned this Jun 26, 2026
@ywkim312 ywkim312 marked this pull request as ready for review June 26, 2026 16:45
@ywkim312 ywkim312 linked an issue Jun 26, 2026 that may be closed by this pull request
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.

Add pagination to Search2 results page Qlever start with a no filters query

1 participant