typesense / typesense/typesense
New feature request - Filter results based on threshold
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.6k
- Forks
- 973
- Avg merge
- 18h 45m
- Merged PRs (30d)
- 4
Description
Description
Typesense result offers the json output with numerical metrics around tokens matched for every resultset.
Can we have a new requirement where the result is shown based on the ratio of tokens matched to the tokens supplied.
E.g. A threshold value of 0.75 or 75% would mean that for input tokens as 4, display the results in the json if 3 or all 4 tokens are matched in the results. If there are 2 tokens matched out of 4 input tokens, then the results should not be displayed.
This will help us to make the results relevant on the search. It would also reduce the payload of the results.
This can be an optional parameter to use in typesense so that anyone who wishes to use it can take benefit of it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Typesense calculates token-match metrics and assembles JSON search results. Define an optional threshold parameter that compares matched tokens with supplied tokens, then verify that results below the ratio are omitted and results meeting it remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100