`MultiSearchResponse` type does not account for union search response shape
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in src/typesense/types/multi_search.py and trace the return annotation used by multi_search.perform(). Compare the federated response described in the issue with the union=True shape in the linked API documentation. Done means the MultiSearchResponse typing accurately represents both response forms without misleading callers.
Written by the indexing model from the issue text.
Description
The MultiSearchResponse type in src/typesense/types/multi_search.py only models the federated (default) multi-search response shape:
class MultiSearchResponse(typing.TypedDict):
results: typing.List[SearchResponse[typing.Any]]
However, the /multi_search endpoint has two distinct response shapes depending on whether union is set in the request:
- Federated search (union absent or False):
returns { "results": [ ...one SearchResponse per query... ] } - Union search (union: True): returns with no results wrapper doc
The current type is incorrect for the union case and gives users a misleading return type annotation when they call multi_search.perform() with union=True.
- Dominant language
- Python
- Stars
- 247
- Forks
- 66
- Avg merge
- 22h 47m
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from typesense/typesense-python
-
`documents.Documents.import_()` `batch_size` argument is ignored, type of `import_parameters` is missing `batch_size`Possibly taken @tharropoulos claimed this 245 days ago. Open
Difficulty 2/5 1-2 days Newbie friendliness 68/100
typesense/typesense-python#124 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
typesense/typesense-python#100 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
typesense/typesense-python#122 · 3 comments ·
-
[Bug] - DeprecationWarning on instantiation of ClientPossibly taken @tharropoulos claimed this 266 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
typesense/typesense-python#114 · 8 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
typesense/typesense-python#97 · 1 comment ·
All issues in typesense/typesense-python
Similar issues
-
[Resource]: LoreOpenresource-submission validation-passed
Difficulty 1/5 Under an hour Newbie friendliness 88/100
hesreallyhim/awesome-claude-code#3234 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openminion/openminion#376 ·
Maintainers usually reply within 1 day
-
Type: ☹︎ Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
posit-dev/great-tables#1028 ·
Maintainers usually reply within 1 day
-
integration: apple_tv
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
home-assistant/core#188282 · 1 comment ·
Maintainers usually reply within 1 day
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"OpenP4: low
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jeffknupp/association#538 ·