typesense / typesense/typesense

Ability to change the limit of drop_tokens_mode (both_side:3)

Open
#2,159 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
26.6k
Forks
973
Avg merge
18h 45m
Merged PRs (30d)
4

Description

Hi, as already discussed in the slack forum, any plans to let users increase the limit of both_side:3 mode in drop_tokens_mode?

Image

This would of course decrease the performance of the search itself, but since users could decide themselves if they would like to increase it, it would allow for more "accurate" results. As Typesense currently does not support boolean search (just boolean filtering), this approach would make it work as an OR search for also longer queries than just 3 Tokens/Words.

Furthermore, this approach might be useful if one wants to use Typesense for their RAG implementation (using Hybrid search), as the Text-Search part could be enhanced at the cost of performance loss

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 locating the implementation and tests for drop_tokens_mode, focusing on the hard-coded both_side:3 limit and how search configuration is parsed. Define how users would set a higher limit, then verify that the setting enables longer OR-style queries without changing the default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.