materio_ai: write stored vectors into Solr documents at indexing (I2)

SolrDocumentSubscriber listens to PostCreateIndexDocumentsEvent and sets
knn1024_vector on each node document from the materio_ai_embedding table
(EmbeddingStorage::loadVectors, one query per batch, active model only).
No call to the model: a full reindex does not depend on Ollama.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
This commit is contained in:
2026-11-17 10:12:50 +01:00
co-authored by Claude Opus 5.5
parent ce6124b707
commit 480691fe3e
3 changed files with 122 additions and 0 deletions
@@ -28,3 +28,9 @@ services:
arguments: ['@config.factory']
tags:
- { name: event_subscriber }
materio_ai.solr_document_subscriber:
class: Drupal\materio_ai\EventSubscriber\SolrDocumentSubscriber
arguments: ['@config.factory', '@materio_ai.embedding_storage']
tags:
- { name: event_subscriber }