Skip to content

Feature/Fuzzy search functionality#1

Open
andy78644 wants to merge 2 commits into
calpa:mainfrom
andy78644:main
Open

Feature/Fuzzy search functionality#1
andy78644 wants to merge 2 commits into
calpa:mainfrom
andy78644:main

Conversation

@andy78644

Copy link
Copy Markdown

This pull request introduces a new fuzzy search functionality to improve the user experience when querying data. It leverages the Fuse.js library for more flexible and accurate search results. The most important changes include adding Fuse.js as a dependency, importing it into the project, and updating the search logic to use Fuse.js instead of a basic string matching approach.

Dependency Addition:

  • package.json: Added Fuse.js ("fuse.js": "^7.1.0") as a project dependency to enable fuzzy search functionality.

Code Enhancements:

  • src/index.ts:
    • Imported Fuse at the top of the file to initialize and use the fuzzy search library.
    • Updated the search logic in the app.post('/webhook', async (c) => { route to use Fuse.js for searching. The new implementation includes configuration options like threshold, ignoreLocation, and includeScore for fine-tuned search results.

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.

1 participant