Handling failed creation of documents

Created on 21 November 2023, over 1 year ago
Updated 9 April 2024, about 1 year ago

Problem/Motivation

If a document fails to be created in typesense, an exception is thrown and handled. However, SearchApiTypesenseBackend::indexItems() no longer returns the list of document IDs that were successfully created prior to the fail. This results in an error later in the code.

Steps to reproduce

Set a field as required in the typesense schema and attempt indexing a node where the field is empty.

Proposed resolution

Make sure SearchApiTypesenseBackend::indexItems() returns its result even after an exception has been caught.

Remaining tasks

Test patch

User interface changes

N/A

API changes

N/A

Data model changes

N/A

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom khaled.zaidan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024