Skip to content

fix: allow partial match for package title#348

Open
shuuji3 wants to merge 1 commit intounjs:mainfrom
shuuji3:fix/support-partial-match-for-package-name
Open

fix: allow partial match for package title#348
shuuji3 wants to merge 1 commit intounjs:mainfrom
shuuji3:fix/support-partial-match-for-package-name

Conversation

@shuuji3
Copy link
Copy Markdown

@shuuji3 shuuji3 commented Dec 28, 2024

🔗 Linked issue

fix #197

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 📰 Content (a new article or a change in the content folder)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Currently, we are using the default processTerm logic with prefix option in minisearch, which only allows the prefix-search for the title of the packages.

I modified the processing operation only for the title field of the package during search index construction so that the partial keyword in the middle of the package name can be searched.

I used the example code in the GitHub comment (lucaong/minisearch#194 (comment)) referred by the original issue #197.

screenshot of search page, showing 7 packages with keyword "x"

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.
    • N/A - this change does not affect the documentation.

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.

Filtering project is not working well

1 participant