algolia / algolia/algoliasearch-client-javascript

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

Offen
#1,506 1 Kommentar 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
1.4k
Forks
226
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne beim Einstiegspunkt saveObjects() und seiner Dokumentation und reproduziere dann das Batch-Verhalten mit einem übergroßen Datensatz. Als abgeschlossen gilt die Aufgabe, wenn die API eine dokumentierte Möglichkeit bietet, fehlerhafte Datensätze zu überspringen und gleichzeitig gültige Datensätze aus dem Batch zu schreiben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
api
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.