Problem/Motivation

Dependent on https://www.drupal.org/project/search_api_ai/issues/3450815

Add full Milvus support, in a submodule with no other dependencies.

Data model changes

Command icon 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

Marcus_Johansson created an issue. See original summary.

marcus_johansson’s picture

Status: Active » Needs review

Added the Milvus module in the fork.

andrewbelcher’s picture

Title: Add decouple Milvus support » Add decoupled Milvus support
Status: Needs review » Reviewed & tested by the community

Reviewed along side #3450815: Add a trait, base class and interface for AI Search API backend engines and looks good!

Worth noting this probably mostly solves #3403577: Implement Milvus as a vector storage backend as well (and crediting @scott_euser accordingly)

andrewbelcher’s picture

Status: Reviewed & tested by the community » Fixed
fishfree’s picture

@Marcus @andrew Thank you for your great work! However, I got "The website encountered an unexpected error. Try again later" when adding a search_api server of backend "Milvus" with your patch. On page /admin/reports/dblog, the detailed error is as below:

Exception: Serialization of 'Closure' is not allowed in serialize() (line 14 of /var/www/html/drupal10/web/core/lib/Drupal/Component/Serialization/PhpSerialize.php).

#0 /var/www/html/drupal10/web/core/lib/Drupal/Component/Serialization/PhpSerialize.php(14): serialize()
#1 /var/www/html/drupal10/web/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php(111): Drupal\Component\Serialization\PhpSerialize::encode()
#2 /var/www/html/drupal10/web/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php(127): Drupal\Core\KeyValueStore\DatabaseStorageExpirable->doSetWithExpire()
#3 /var/www/html/drupal10/web/core/lib/Drupal/Core/Form/FormCache.php(197): Drupal\Core\KeyValueStore\DatabaseStorageExpirable->setWithExpire()
#4 /var/www/html/drupal10/web/core/lib/Drupal/Core/Form/FormBuilder.php(463): Drupal\Core\Form\FormCache->setCache()
#5 /var/www/html/drupal10/web/core/lib/Drupal/Core/Form/FormBuilder.php(645): Drupal\Core\Form\FormBuilder->setCache()
#6 /var/www/html/drupal10/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm()
#7 /var/www/html/drupal10/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#9 /var/www/html/drupal10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#10 /var/www/html/drupal10/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /var/www/html/drupal10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#12 /var/www/html/drupal10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#13 /var/www/html/drupal10/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/html/drupal10/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#15 /var/www/html/drupal10/web/modules/contrib/bat_api/src/StackMiddleware/BatApiMiddleware.php(39): Symfony\Component\HttpKernel\HttpKernel->handle()
#16 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Drupal\bat_api\StackMiddleware\BatApiMiddleware->handle()
#17 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#18 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#19 /var/www/html/drupal10/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#20 /var/www/html/drupal10/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#21 /var/www/html/drupal10/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#22 /var/www/html/drupal10/web/modules/contrib/services/src/StackMiddleware/FormatSetter.php(45): Drupal\page_cache\StackMiddleware\PageCache->handle()
#23 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\services\StackMiddleware\FormatSetter->handle()
#24 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#25 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#26 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#27 /var/www/html/drupal10/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#28 /var/www/html/drupal10/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#29 {main}

My search_api & openai & search_api_ai & search_api_solr are all the latest dev version.
I tried adding a solr backend server successfully.

FYI: https://julian.pustkuchen.com/de/fix-drupal-error-exception-serializatio...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.