typesense / typesense/typesense
Semantic search with group_by returns no results when only vector search matches are found
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.6k
- Forks
- 973
- Avg merge
- 18h 45m
- Merged PRs (30d)
- 4
Description
Bug Description
When using semantic search together with group_by, no results are returned if documents are found only via vector search.
Reproduction Steps
See the linked gist: https://gist.github.com/Nio-o/4ca12e5cf4c32b207f05b45731dac9c6
- Create a collection with embeddings and a facet field (e.g. groupId)
- Upload documents
- Perform a semantic search on this collection using group_by: groupId
- If keyword search returns zero results, the overall response contains zero results, even though vector search finds matches
Expected vs Actual
Expected behavior
Even if keyword search returns no results, semantic (vector) search results should still be returned, since vector search finds matching documents.
Actual behavior
No results are returned, despite vector search finding matching documents.
Environment
- Typesense version:
v30.0.rca35 - Operating system:
macOS 14.2.1 - Client library & version:
-
Schema / Configuration
The schema and configuration can be found in the link above.
Additional Context
The issue exists in v30.0.rca35, but not in v29.0.
The minimum version that reproduces the bug is v30.0.rc18.
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 with the linked reproduction gist and compare the semantic-search and group_by behavior between v29.0 and v30.0.rc18, where the regression first appears. Trace the path taken when keyword search has no matches but vector search does; done means the reproduction returns the vector matches while retaining group_by behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100