Items don't get deleted when they are removed from the index
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3579027. -->
Reported by: [jelleglebbeek](https://www.drupal.org/user/3729474)
Related to !28
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When I remove a node, the SAPI back-end tries to remove it with a delete API call to Vragen.ai. The issue is that this delete call does not take canonical language into account. This means that when one language is removed, it will remove the entire document from Vragen.ai, even if the canonical language is still present.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Delete a node that is indexed by SAPI. No document is removed as the external reference does not match.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Add stripped external reference and language support to deleteItems().</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None</p>
<h3 id="summary-api-changes">API changes</h3>
<p>None</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>None</p>
issue