Problem
Running scripts/solr_activate_and_reindex.py --rag-enable with the KITCONCEPT_SOLR_LLM_* environment variables unset (or incomplete — the URL is the required one) completes a full reindex without producing any RAG chunks or embeddings, and says nothing about it. The run looks successful; you only discover the missing chunks when RAG queries come back empty.
This bit us during a debugging session: full reindex, env file not sourced, no warning — the classic index was rebuilt, the RAG side silently skipped.
Why it happens
get_rag_config() returns None when the endpoint URL env var is missing, and the indexing path treats that as "feature off" (graceful degradation). That design is right at request time — a site without credentials should degrade to classic search without hard errors — but wrong for an explicit --rag-enable run: the operator has just asked for RAG, so a missing configuration is an error in the invocation, not a feature toggle.
Expected behavior
When --rag-enable is passed and the registry toggle ends up on but get_rag_config() returns None:
- print a prominent warning at the start of the run (before the long reindex), naming the missing variable(s), e.g.
WARNING: --rag-enable requested but KITCONCEPT_SOLR_LLM_URL is not set — reindexing WITHOUT chunks/embeddings
- preferably: refuse to run unless a
--force / --without-rag flag acknowledges the degraded mode.
The same check applies to the --clear variant (where the silent outcome is worst: existing chunks are wiped and not rebuilt).
Request-time behavior stays unchanged — this is only about the explicit reindex script.
Problem
Running
scripts/solr_activate_and_reindex.py --rag-enablewith theKITCONCEPT_SOLR_LLM_*environment variables unset (or incomplete — the URL is the required one) completes a full reindex without producing any RAG chunks or embeddings, and says nothing about it. The run looks successful; you only discover the missing chunks when RAG queries come back empty.This bit us during a debugging session: full reindex, env file not sourced, no warning — the classic index was rebuilt, the RAG side silently skipped.
Why it happens
get_rag_config()returnsNonewhen the endpoint URL env var is missing, and the indexing path treats that as "feature off" (graceful degradation). That design is right at request time — a site without credentials should degrade to classic search without hard errors — but wrong for an explicit--rag-enablerun: the operator has just asked for RAG, so a missing configuration is an error in the invocation, not a feature toggle.Expected behavior
When
--rag-enableis passed and the registry toggle ends up on butget_rag_config()returnsNone:WARNING: --rag-enable requested but KITCONCEPT_SOLR_LLM_URL is not set — reindexing WITHOUT chunks/embeddings--force/--without-ragflag acknowledges the degraded mode.The same check applies to the
--clearvariant (where the silent outcome is worst: existing chunks are wiped and not rebuilt).Request-time behavior stays unchanged — this is only about the explicit reindex script.