Skip to content

[BUGFIX] Move vector search config inside search { } block - #78

Open
dkd-dobberkau wants to merge 1 commit into
TYPO3-Solr:mainfrom
dkd-dobberkau:bugfix/vector-search-typoscript-block
Open

[BUGFIX] Move vector search config inside search { } block#78
dkd-dobberkau wants to merge 1 commit into
TYPO3-Solr:mainfrom
dkd-dobberkau:bugfix/vector-search-typoscript-block

Conversation

@dkd-dobberkau

Copy link
Copy Markdown

Summary

The vector search configuration in this demo sitepackage is silently disabled
because the three keys live one level too high in the TypoScript hierarchy.

The current setup writes:

  • plugin.tx_solr.query.type = 1
  • plugin.tx_solr.vectorSearch.minimumSimilarity = 0.75
  • plugin.tx_solr.vectorSearch.topK = 1000

…but EXT:solr reads:

  • plugin.tx_solr.search.query.type (TypoScriptConfiguration::getSearchQueryType())
  • plugin.tx_solr.search.vectorSearch.minimumSimilarity (getMinimumVectorSimilarity())
  • plugin.tx_solr.search.vectorSearch.topK (getTopKClosestVectorLimit())

So isVectorSearchEnabled() always returns false on this demo site:

  • AbstractIndexer never copies contentvectorContent
  • SolrWriteService::addDocuments() never appends update.chain=textToVector
  • No embeddings are produced during indexing
  • Frontend search never goes through the vector path

This patch moves the three keys inside the existing search { } block so
EXT:solr picks them up and the demo actually exercises the vector pipeline
that landed in 13.1 / EXT:solr 14.

Reproduction (before the fix)

With Solr 10 + language-models module + a registered LLM in the model store
(e.g. local Ollama with nomic-embed-text via OpenAI-compatible endpoint):

  1. ddev exec "vendor/bin/typo3 scheduler:execute --task=2"
  2. Watch the embedding endpoint → 0 calls
  3. Reports → Status → Apache Solr Text to Vector shows model present, but no
    document ever gets a vector

After the fix:

  1. Same setup, re-run the worker
  2. One embedding call per indexed document (verified locally: 158 calls
    for 58 docs in core_en)
  3. Frontend search at /content-examples/form-elements/search?q=… returns
    semantically related hits even when the query has no keyword overlap with
    any title (verified locally on EXT:solr 14.0.0-beta1).

Test plan

  • Bring up the demo site with ddev start
  • Configure a working llm model in the Solr model store
  • Re-index via Force Re-Indexing task or Index Queue Worker
  • Confirm embedding endpoint receives one call per document
  • Run a frontend search and observe semantic results

🤖 Generated with Claude Code

The vectorSearch settings were placed outside the search { } block, which
made TypoScript resolve them to plugin.tx_solr.query.type and
plugin.tx_solr.vectorSearch.* — but EXT:solr reads from
plugin.tx_solr.search.query.type. As a result, vector search was
silently disabled in the demo site:

* TypoScriptConfiguration::isVectorSearchEnabled() returned false
* AbstractIndexer never set vectorContent on documents
* SolrWriteService never appended update.chain=textToVector
* No embeddings were produced during indexing

Move the three keys inside the search { } block so EXT:solr picks them
up correctly and the demo actually exercises the vector pipeline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant