Add decoupled Milvus support

Created on 30 May 2024, 6 months ago
Updated 17 June 2024, 5 months ago

Problem/Motivation

Dependent on https://www.drupal.org/project/search_api_ai/issues/3450815 Add a trait, base class and interface for AI Search API backend engines RTBC

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

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany marcus_johansson

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

Merge Requests

Comments & Activities

  • Issue created by @marcus_johansson
  • Status changed to Needs review 6 months ago
  • 🇩🇪Germany marcus_johansson

    Added the Milvus module in the fork.

  • Status changed to RTBC 6 months ago
  • 🇬🇧United Kingdom andrewbelcher

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

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

  • Merge request !21Milvus support → (Merged) created by marcus_johansson
  • Status changed to Fixed 6 months ago
  • 🇨🇳China fishfree

    @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...

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

Production build 0.71.5 2024