Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implemented backend api support for keyword-based search mechanism #48

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

cindy-wg
Copy link
Contributor

Implemented a backend change so that the search bar frontend feature (#34) is able to be used to enter a keyword and filter through posts in different categories and pages according to the topic. This is done through an API endpoint that filters through topic titles and keeps ones containing the keyword. The purpose of this is to allow users to search posts by topic based on keywords no matter the page or category they are searching through. Solves #28

Searching 'hello'
Screenshot 2025-02-27 at 4 50 01 PM

Searching 'nodebb'
Screenshot 2025-02-27 at 4 50 40 PM

Seaching 'x' (no results)
Screenshot 2025-02-27 at 4 51 03 PM

@cindy-wg cindy-wg added the enhancement New feature or request label Feb 27, 2025
@cindy-wg cindy-wg added this to the Sprint 2 milestone Feb 27, 2025
@cindy-wg cindy-wg self-assigned this Feb 27, 2025
@cindy-wg cindy-wg linked an issue Feb 27, 2025 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Feb 27, 2025

Pull Request Test Coverage Report for Build 13577464713

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 20 of 22 (90.91%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 82.678%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/api/search.js 5 6 83.33%
src/topics/search.js 10 11 90.91%
Totals Coverage Status
Change from base Build 13575545299: 0.004%
Covered Lines: 22376
Relevant Lines: 25641

💛 - Coveralls

@nysagarg04
Copy link
Contributor

This is amazing! Great work!

@ethan1696
Copy link
Contributor

Looks good to me!

@cindy-wg cindy-wg merged commit 5fe3571 into main Feb 28, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend: Implement keyword-based search mechanism
4 participants