Drupal RAG Toolkit 1.0.0-alpha13¶
Summary¶
Alpha13 lets the toolkit share a site with other search indexes, such as an existing Search API Solr setup. Before, any site with Search API Solr installed failed setup preflight. The toolkit now changes no index it does not own, gives its own indexes a documented marker, and adds a Drush preflight command for deploy scripts.
Upgrading from alpha12¶
No reinstall and no database updates: update the package and clear caches.
composer require 'drupal/drupal_rag_toolkit:^1.0@alpha'
drush updb -y
drush cr
Active indexes keep serving; nothing needs rebuilding.
Sharing the site with other search indexes¶
- Other modules' locked processors. Search API adds every locked
processor to every index. Search API Solr's
auto_aggregated_fulltext_fieldandsolr_date_rangedon't limit themselves to Solr indexes, so preflight reported "The executable processor plugin is unsupported." A RAG index now accepts such a processor when it changes no query and adds no field the index uses. A processor that changes queries, such as a site's access processor, stops preflight with its name and module. - The toolkit's own processor is no longer saved into other indexes on the site. It attaches only to indexes whose server uses the toolkit's chunking strategy. Another index that already lists it drops it the next time that index is saved.
- A marker on every toolkit index. Each Search API index the toolkit
owns, candidates included, has an enforced module dependency on
drupal_rag_toolkit_search_api. Modules can check it to skip RAG indexes. - Tagged queries. RAG retrieval queries carry the tag
drupal_rag_toolkit, so other modules' Search API query alter hooks can skip them.
How indexing and serving work has the details.
Deploy scripts¶
drush drupal-rag-toolkit:preflightprints the checks of RAG setup preflight as JSON and exits with 1 when one fails. Add--before-buildon a site that has not activated an index yet.
Documentation¶
- Results are checked against the visitor's entity access, including
hook_entity_access()rules your site adds. This is now documented as part of the public contract. - Because that check runs after retrieval, a page can show fewer results than the retrieval limit when many are hidden from the visitor.
- Builds send unpublished and hidden content to the embedding provider too; the privacy section now says so.
- Composer Patches 1.x works with patches listed inline in
composer.json.