Skip to content

Development

Tests

The unit tests run anywhere. The kernel tests need a Solr core, named by AI_VDB_SOLR_URL; without it they are skipped.

docker run -d --name solr -p 8983:8983 solr:10.0.0 solr-precreate vectors
AI_VDB_SOLR_URL=http://localhost:8983/solr/vectors vendor/bin/phpunit -c core modules/contrib/ai_vdb_provider_solr

For a core behind basic authentication, put the user name and password in the address: http://user:password@localhost:8983/solr/vectors. Set AI_VDB_SOLR_QUANTIZATION to scalar or binary to test quantized collections on Solr 10.

The Pantheon submodule's unit tests run anywhere. Its kernel test runs only where PANTHEON_ENVIRONMENT and PANTHEON_INDEX_HOST are set, and only reads the core; elsewhere it is skipped.

Drupal.org's CI runs the kernel tests on Solr 10 (without quantization, then with scalar and with binary) and on Solr 9.1, the oldest Solr the module supports. See .gitlab-ci.yml.

Extending

See Extending for the events and the Solr client.

Documentation

This site is built with Material for MkDocs and the Drupal Pages theme. To preview it:

python3 -m venv .venv
.venv/bin/python -m pip install -r docs/requirements.txt
.venv/bin/mkdocs serve

Drupal.org's CI publishes it to GitLab Pages when a commit to 1.0.x changes docs/ or mkdocs.yml.