Ran into "Unable to decode output into JSON: Syntax error" when deleting items from the Qdrant index.
So.. Search api passes item IDs as an associative array. This happens in `Index::indexSpecificItems` where `$rejected_ids` is initialized with `array_combine($ids, $ids)`:

$rejected_ids = array_combine($rejected_ids, $rejected_ids); // ['id1' => 'id1']

When this reaches the getVdbIds in QdrantProvider, it is fed as is to the query filters. Then the provider makes a request to Qdrant, but in the middle guzzle uses json encode which leads to the old as time issue of having '{}' instead of '[]' which Qdrant's "any" matcher requires.

..biribiri...
"match": { "any": { "entity:node/9946:en": "entity:node/9946:en" } } // Breaks Qdrant's matcher
..biribiri...
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

marios anagnostopoulos’s picture

Title: Qdrant JSON Syntax Error » Qdrant JSON Syntax Error when deleting index items

marios anagnostopoulos’s picture

Status: Active » Needs review
stmh’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.