- Issue created by @joshhytr
- Merge request !2523486166-pass-metric-type | Add support for vector search time metric selection β (Merged) created by joshhytr
- π¬π§United Kingdom scott_euser
Thanks Josh; I think we should probably pass something more generic to avoid further interface changes in the future though. If for example we pass the QueryInterface you can then access the query, index, and server. So in your case I believe $query->getIndex()->getServerInstance()->getBackendConfig() should contain the metric.
Also latest phpcs changes use statement order, so test coverage is failing.
- Status changed to Needs work
2 months ago 1:30pm 21 January 2025 - π¬π§United Kingdom seogow
@joshhytr this issue was flagged is important for [Meta] Bring AI Search out of Experimental π± [Meta] Bring AI Search, Assistants and Chatbot out of Experimental Active . We would like to have it fixed until 4th February 2025. Will you manage or are you happy for maintainers to help?
Thanks @seogow, thanks @scott_euser.
I've updated the MR with the suggested change and have been able to obtain the metric_type from the query as required.
- π©πͺGermany marcus_johansson
@seogow or @scott_euser, could you check this out?
- π¬π§United Kingdom scott_euser
This seems fine yeah, we just need to do a coordinated release with Milvus and Pinecone as the interface will cause a breaking change. Are there any other VDB providers we know of?
I believe we then need to add:
- conflict to composer.json of AI module for current release of Milvus and Pinecone
- conflict to composer.json of Milvus and Pinecone for current release of AI module
That way we force people to composer update them together. That sound right?
- πΊπΈUnited States SocialNicheGuru
@scott_euser in #8 is correct.
This does break https://www.drupal.org/project/ai_vdb_provider_milvus: β
"PHP message: PHP Fatal error: Declaration of Drupal\ai_vdb_provider_milvus\Plugin\VdbProvider\MilvusProvider::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 drupal-10.4.x/html/modules/contrib/ai_vdb_provider_milvus/src/Plugin/VdbProvider/MilvusProvider.php on line 597
- πΊπΈUnited States SocialNicheGuru
- π«π·France Anwoon
Temporary patch for fix them (i make this for my test)
- π©πͺGermany marcus_johansson
Thanks @joshtyr - this is going into 1.1.x-dev, that will have this breaking change. We will update the Milvus and Pinecone providers to also have 1.1.x releases fixed to the 1.1.x release of AI module.
This means that you can have a requirement to 1.1.0-dev for now and later 1.1.0 and hopefully the vdb provider should work as expected.
- πΊπΈUnited States SocialNicheGuru
π Update to use ai 1.1.x-dev Active
- Status changed to Fixed
11 days ago 1:49am 26 March 2025 Automatically closed - issue fixed for 2 weeks with no activity.