- 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
7 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
5 months ago 1:49am 26 March 2025 Automatically closed - issue fixed for 2 weeks with no activity.
- Issue was unassigned.
- πΊπΈUnited States Kristen Pol Santa Cruz, CA, USA
Issue cleanup per π Unassign closed AI issues and update issue metadata Active
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
This caused a BC break in π Make compatible with 1.1.x series of the AI module Active What's the BC policy for this module? I assumed we can't just add params to interfaces in minor releases?
- π©πͺGermany marcus_johansson
@kim.pepper - we had to do a special case for this in terms of BC, normally no BC happens until 2.0.0, but:
1. We knew that 2.0.0 was around 1 year away due to us wanting to bootstrap everything in the AI world, before refactoring/rewriting.
2. This change was required to be able to handle Postgresql and most likely MySQL when it comes.
3. I was not a change that could be made with some code-wise bad workaround that could be refactored in 2.0.0, it was a required change to get it working.
4. And most importantly - the submodule and its providers was (and is still) experimental.Because of the traction the AI module has gotten with the new initiative, it will not happen again, and we will have BC only in major versions. We do require that you use any abstract class available for any plugin system, so any added methods to interfaces doesn't cause BC.