01. Why Apache Solr 10 for Enterprise Vector Search?
Apache Solr 10 introduces major advances in dense vector search. By natively supporting solr.DenseVectorField with HNSW indexing, Solr combines world-class full-text search with modern vector similarity scoring.
SolrJ 10 JDK HTTP Client: Solr 10 replaces legacy Jetty client dependencies with Java's standard java.net.http.HttpClient (HttpJdkSolrClient / CloudSolrClient), eliminating classpath library conflicts and ensuring high-performance asynchronous HTTP connections.
02. End-to-End Pipeline Architecture
03. Automatic REST Schema Auto-Provisioning
Upon initialization, SolrCollectionInitializer checks whether the target Solr collection contains the required knn_vector field type and schema fields. If missing, it automatically posts the field type definition to Solr's Schema API:
{
"add-field-type": {
"name": "knn_vector",
"class": "solr.DenseVectorField",
"vectorDimension": 1024,
"similarityFunction": "cosine",
"knnAlgorithm": "hnsw",
"hnswMaxConnections": 16,
"hnswBeamWidth": 100,
"vectorEncoding": "FLOAT32"
},
"add-field": [
{ "name": "id", "type": "string", "stored": true, "indexed": true },
{ "name": "text", "type": "text_general", "stored": true, "indexed": true },
{ "name": "embeddings", "type": "knn_vector", "stored": true, "indexed": true },
{ "name": "security_allowed_read", "type": "string", "stored": true, "indexed": true, "multiValued": true },
{ "name": "security_denied_read", "type": "string", "stored": true, "indexed": true, "multiValued": true }
]
}
04. Configuration Properties
All properties are prefixed with spring.opencrawling.output.solr.* and support environment variable overrides:
| Property | Default | Description |
|---|---|---|
spring.opencrawling.output.solr.mode |
standalone |
Solr deployment mode: standalone or cloud |
spring.opencrawling.output.solr.url |
http://localhost:8983/solr |
Base HTTP URL of standalone Solr instance |
spring.opencrawling.output.solr.collection |
enterprise_kb |
Target Solr collection / core name |
spring.opencrawling.output.solr.dimensions |
1024 |
Vector embedding dimension size |
spring.opencrawling.output.solr.vector-encoding |
FLOAT32 |
Solr 10 vector encoding: FLOAT32 or BYTE |
spring.opencrawling.output.solr.quantization |
none |
Solr 10 quantization: none, scalar, or binary |
05. Dense Vector Search Queries with Solr 10 KNN Parser
Executing hybrid and vector similarity searches against Apache Solr is straightforward using Solr's {!knn} query parser:
// Full-Text Search
curl "http://localhost:8983/solr/enterprise_kb/select?q=text:OpenCrawling&fl=id,text,uri,score"
// Dense Vector KNN Search (Solr 10)
curl --data-urlencode "q={!knn f=embeddings topK=5}[0.0123,-0.0456,0.0891,...]" \
--data-urlencode "fl=id,text,uri,score" \
"http://localhost:8983/solr/enterprise_kb/select"
06. Getting Started & Integration Testing
You can spin up Apache Solr and run the complete decoupled integration pipeline with one command:
./scripts/test-solr-decoupled.sh
Ready to Index Enterprise Documents into Apache Solr 10?
Explore the full connector source code, build custom RAG pipelines, or read our wiki guide.