`MultiSearchResponse` type does not account for union search response shape
評価
調査の方向性
src/typesense/types/multi_search.py から始め、multi_search.perform() で使われている戻り値のアノテーションをたどってください。issue で説明されている federated response と、リンク先の API ドキュメントにある union=True の形式を比較してください。MultiSearchResponse の型付けが、呼び出し側に誤解を与えることなく両方のレスポンス形式を正確に表現できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 247
- フォーク
- 66
- 平均マージ
- 22時間 47分
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
typesense/typesense-python のほかの issue
-
`documents.Documents.import_()` `batch_size` argument is ignored, type of `import_parameters` is missing `batch_size`対応中かも @tharropoulos が 245 日前に担当しました。 オープン
難易度 2/5 1〜2日 初心者へのやさしさ 68/100
typesense/typesense-python#124 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
typesense/typesense-python#100 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
typesense/typesense-python#122 · コメント 3 件 ·
-
[Bug] - DeprecationWarning on instantiation of Client対応中かも @tharropoulos が 266 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
typesense/typesense-python#114 · コメント 8 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
typesense/typesense-python#97 · コメント 1 件 ·
typesense/typesense-python の issue をすべて見る
似ている issue
-
Python Volcengine provider returns failures instead of raising them対応中かも @Ricardo-M-L が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
agent-infra/sandbox#248 ·
-
Textractor leaves empty temporary files when remote retrieval fails対応中かも @HuaTNA が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
test(bm_generation): pin the learning parameters and CPU sync shortcut対応中かも @iloveeyjafjalla が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
qboson/kaiwu-pytorch-plugin#1341 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
elder-plinius/V3R1T4S#625 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
foxglove/mcap#1907 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信