vectorSearch missing QueryInterface $query

Created on 31 March 2025, 13 days ago

PHP message: PHP Fatal error: Declaration of Drupal\ai_vdb_provider_pinecone\Plugin\VdbProvider\PineconeProvider::vectorSearch(string $collection_name, array $vector_input, array $output_fields, mixed $filters = [], int $limit = 10, int $offset = 0, string $database = 'default'): array must be compatible with Drupal\ai\AiVdbProviderInterface::vectorSearch(string $collection_name, array $vector_input, array $output_fields, Drupal\search_api\Query\QueryInterface $query, string $filters = '', int $limit = 10, int $offset = 0, string $database = 'default'): array in /var/www/html/web/modules/contrib/ai_vdb_provider_pinecone/src/Plugin/VdbProvider/PineconeProvider.php on line 581

A commit in the AI module added

QueryInterface $query to the vectorSearch so the implementation here should match.

This is fixed in the 1.1.x branch.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States keiserjb

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

Comments & Activities

  • Issue created by @keiserjb
  • πŸ‡¬πŸ‡§United Kingdom scott_euser

    But 1.1 here is requiring 1.1 of AI module which is where the interface change is right? So if you composer update to 1.1 here you'll get AI 1.1, and have no issue. Or if you lock to 1.0 and composer update you'll stay at AI 1.0 without the breaking change. So as long as you manage dependencies via composer you should never have any issues right?

  • πŸ‡ΊπŸ‡ΈUnited States keiserjb

    I somehow had 1.0 dev installed with AI dev and it didn't work.

  • πŸ‡ΊπŸ‡ΈUnited States keiserjb

    It was my fault but it was possible to install AI 1.1 and ai_avb_provider_pinecone 1.0.

    When I matched them it worked.

Production build 0.71.5 2024