algolia / algolia/algoliasearch-client-javascript

Add option to skip failing records on saveObjects() rather than letting the complete operation fail

オープン
#1,506 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る
enhancement
主要言語
TypeScript
スター
1.4k
フォーク
226
PR マージ指標
30日以内にマージされた PR はありません

説明

I tried to add records to my index and one of those records exceeds the size:
` content: '{"message":"Record at the position 69 objectID=0db0a327-b567-4225-bd4e-9f1019c930cd is too big size='... `

Apparently the complete batch operation fails, i.e. no records are written to the index at all. Is there any option to just skip failing records and still write the others to the index? I have not found such an option in the docs.

The only (not so nice) option I see is to check the error response, get the failed record IDs, remove them from the record list and try the operation again.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

saveObjects() のエントリーポイントとそのドキュメントから始め、次にサイズ超過のレコードを使ってバッチの動作を再現します。完了条件は、API が失敗するレコードをスキップしつつ、バッチ内の有効なレコードを引き続き書き込むためのドキュメント化された方法を提供することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
api
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。