typesense / typesense/typesense

New feature request - Filter results based on threshold

Open
#1,395 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.