CodeYogiCo commented on issue #64:
URL: https://github.com/apache/solr-mcp/issues/64#issuecomment-4915810743
Hi @adityamparikh — I'd like to pick this issue up. Before writing code, I
want to align on the one design decision that shapes everything else: **where
query/document text gets converted to vectors**, since Solr's `{!knn}` parser
only accepts raw vectors and the MCP client can't be the one supplying them (an
LLM can't reliably round-trip 1536 floats through tool-call arguments —
prohibitive token cost and lossy). So embedding has to be a capability *inside*
the tools, and there are two realistic homes for it:
1. **In the MCP server, via Spring AI's `EmbeddingModel` abstraction** *(my
recommendation)*. The server is already a Spring AI app, so this is a natural
fit: optional embedding starters (OpenAI, Ollama, local ONNX transformers)
selected by classpath + env vars — configured exactly like `SOLR_URL` is today,
and **off by default** so existing deployments are untouched. Works against any
Solr 9.x.
2. **In Solr, via the `llm` module (Solr 9.8+)** — `{!knn_text_to_vector}`
and the TextToVector update processor. No embedding code in this server, but it
requires users to enable the module and configure models on the Solr side,
which is outside the MCP server's control, and it caps the supported Solr range
at 9.8+.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]