typesense / typesense/typesense

Feature Request: Partial searches for synonyms

Open
#1,485 1 comment 6 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

Description

Currently, Typesense only supports synonyms for exact matches. For example, if a document has the title "pants" and I create a synonym "trousers ~ pants", it finds the documents if I search for "trousers", but it's not returned if I search for "trou".

Alternatives

The current workaround is to add a text field on the document, and use it to search on.
While this works generally, it doesn't scale across documents and makes it hard to maintain.

Expected Behavior

An option on the synonym configuration whether partial matches should be enabled.

Actual Behavior

Not supported.

Metadata

Typesense Version: v0.26.0.rc26

OS: Cloud

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 synonym configuration and exact query matching are handled, then compare that path with partial-search behavior. Done means an optional synonym setting enables searches such as "trou" to match the synonym "trousers" without changing the existing exact-match behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
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.