Problem/Motivation
1. At the moment it is hard to find out errors in queries from searching milvus.
2. Vector search is done at `\Drupal\ai_vdb_provider_milvus\Plugin\VdbProvider\MilvusProvider::vectorSearch` but there is no logging or exception catching in this method
Steps to reproduce
1. Create a search query with a broken filter
2. Note that there are no results that get returned but no indication what the error with the filters are.
Proposed resolution
1. Add logging in `\Drupal\ai_vdb_provider_milvus\Plugin\VdbProvider\MilvusProvider::vectorSearch` if the expected data structure is not returned `$data['data']`
2. It appears that a `$data['code']` and `$data['message']` is returned from the request.
So:
if (isset($data['data'])) {
return $data['data'];
}
$this->getLogger('ai_vdb_provider_milvus_provider')->error(sprintf('Error: %s Message: %s', $data['code'], $data['message']));
return [];
might be all that is needed.
Issue fork ai_vdb_provider_milvus-3540669
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
Comment #4
richardgaunt commentedComment #6
scott_euser commentedAdded some feedback, thanks!