'Vector of each node translation, computed by the embedding model.', 'fields' => [ 'nid' => [ 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => 'Node ID.', ], 'langcode' => [ 'type' => 'varchar_ascii', 'length' => 12, 'not null' => TRUE, 'description' => 'Language of the vectorized translation.', ], 'model' => [ 'type' => 'varchar_ascii', 'length' => 128, 'not null' => TRUE, 'description' => 'Model that computed the vector, for example bge-m3:567m.', ], 'text_hash' => [ 'type' => 'varchar_ascii', 'length' => 64, 'not null' => TRUE, 'description' => 'SHA-256 of the vectorized text, to skip unchanged texts.', ], 'vector' => [ 'type' => 'blob', 'size' => 'normal', 'not null' => TRUE, 'description' => 'Vector as little-endian 32-bit floats.', ], 'changed' => [ 'type' => 'int', 'not null' => TRUE, 'default' => 0, 'description' => 'Unix timestamp of the last vectorization.', ], ], 'primary key' => ['nid', 'langcode'], 'indexes' => [ 'model' => ['model'], ], ]; return $schema; } /** * Adds the search timeout setting (H8). */ function materio_ai_update_11001(): void { $config = \Drupal::configFactory()->getEditable('materio_ai.settings'); if ($config->get('search_timeout') === NULL) { $config->set('search_timeout', 1.0)->save(TRUE); } }