Pass Search API Server object to AiVdbProvider plugins for more context
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3521601. --> Reported by: [a.dmitriiev](https://www.drupal.org/user/3235287) Related to !575 !640 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Some Vector Database providers like Postgres require more context to perform requests to the server, for example metric type should be taken from Search Api Server backend configuration. So it should be a good idea to pass the server object to plugin, so that it can be used to get more information during query and index time.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Check <a href="https://www.drupal.org/project/ai_vdb_provider_postgres">https://www.drupal.org/project/ai_vdb_provider_postgres</a> </p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Create a trait and set server to vector db provider plugin when initializing it with Search API backend.</p>
issue