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:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user