manticoresoftware / manticoresearch-php

Official PHP client for Manticore Search
MIT License
167 stars 32 forks source link

ResponseException with message ""\"in\" filter should contain an array of values for not sequencial ids #173

Closed donhardman closed 10 months ago

donhardman commented 10 months ago

The getDocumentByIds method throws an exception when the list of IDs passed to it is a filtered array, meaning it doesn't have an element at index 0. Here's the pseudo code to reproduce:

$ids = [1 => 123];
$docs = $index->getDocumentByIds($ids);

We can use the array_values() function, but not sure that it's a proper solution.

donhardman commented 10 months ago

Potential fix to review: https://github.com/manticoresoftware/manticoresearch-php/pull/177