Apache Solr Reference

This section documents the current Solr line (10.0; 9.10.x the maintained 9.x branch), written and verified against the Apache Solr Reference Guide. No specific patch version is pinned. Some capabilities (the Solr Operator on Kubernetes, the package-manager ecosystem, Learning To Rank model training, and expert plugin development) are linked, not documented in depth.

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

This section’s bibliography lists the reference material consulted while preparing these pages.

Welcome to the Apache Solr reference. Apache Solr is a standalone search server built on Apache Lucene: it stores documents indexed into cores or, in a distributed deployment, collections sharded and replicated across a cluster, exposes JSON, XML and CSV over an HTTP API, analyzes text into an inverted index for relevance-ranked full-text search, and layers request handlers, query parsers, faceting, highlighting and streaming/SQL capabilities on top. This section documents the current Solr line as a database-developer reference — the search-server model, schema and analysis, indexing and querying, relevance, the SolrCloud distributed model and operations, security and deployment, and the SolrJ client — written and verified against the Apache Solr Reference Guide.

If you are new to Solr, read Getting Started first, then Core Concepts & Architecture and Schema & Fields, followed by Query Basics & Parameters. Everything after that builds on those foundations. For the closest comparison, see the sibling Elasticsearch Reference and, for the full write-up, Solr vs. Elasticsearch.

For the relational and document-database baselines this section contrasts with, see the sibling SQL Reference, MongoDB Reference and Couchbase Reference, which the Solr pages cross-link rather than restate. For where a dedicated search engine fits alongside a primary store, see Choosing the Right Database.

What’s covered

Getting started

  • Getting Started — Solr as a standalone search server on Apache Lucene, the release line, the bin/solr control script, running Solr (binary, Docker, the Solr Operator), the Admin UI, curl/bin/solr post conventions, and a first create-collection/index/search round-trip.

Core concepts, schema & analysis

  • Core Concepts & Architecture — documents and fields, the inverted index, cores vs. collections, user-managed vs. SolrCloud cluster types, the request-handler processing pipeline, and near-real-time search.

  • Schema & Fields — schema.xml vs. the managed schema and Schema API, Schemaless mode, uniqueKey, field/dynamicField/copyField, and field flags.

  • Field Types — StrField/TextField, the current point-based numeric types, DatePointField, BoolField, currency, UUIDField, spatial and DenseVectorField.

  • Text Analysis — the char-filter/tokenizer/token-filter chain, index-time vs. query-time analyzers, and practical tokenizer/filter recipes.

  • Language Analysis — per-language analyzer chains, Hunspell stemming, ICU folding, phonetic matching, and multilingual strategies.

Indexing

  • Indexing & Updates — the update handlers and endpoints, the Post Tool, commits (hard/soft), the transaction log, RealTime Get, URP chains, Solr Cell/Tika, and the Data Import Handler.

  • Partial Updates & Concurrency — atomic/in-place updates, version optimistic concurrency control, nested child documents, and de-duplication.

Querying

  • Query Basics & Parameters — the /select handler, common query parameters, q vs. fq and the filter cache, and pagination including keyset-style cursorMark deep paging.

  • Query Parsers — the standard parser, DisMax/eDisMax, local params, and specialised parsers (join, block-join, \{!collapse}, \{!knn}, and more).

  • JSON Request API — the JSON Request API and JSON Query DSL, the params block, and ParamSets/the Request Parameters API.

  • Function Queries — function-query syntax, \{!func}/\{!frange}, and the function catalog.

  • Relevance & Scoring — BM25 as the current default similarity, debugQuery, boosting, and the Query Elevation Component.

  • Faceting — classic field/query/range/pivot faceting and the JSON Facet API in full.

  • Grouping & Collapse — result grouping vs. the Collapsing query parser and Expand component.

  • Highlighting — the Unified Highlighter and hl.* parameters.

  • Spell Check & Suggest — the SpellCheck and Suggester components, the Terms component, MoreLikeThis, Query Re-Ranking, and Learning To Rank.

  • Spatial Search — LatLonPointSpatialField, \{!geofilt}/\{!bbox}, and polygon/heatmap search.

  • Dense Vector Search — DenseVectorField, the \{!knn} query parser, and hybrid lexical + vector search.

  • Streaming Expressions & SQL — the /stream and /sql handlers, streaming expressions, and Parallel SQL over JDBC.

SolrCloud & operations

  • SolrCloud Architecture — collections/shards/replicas, ZooKeeper, the Overseer, shard-leader election, and replica types (NRT/TLOG/PULL).

  • Collections & Configsets — the Collections API, configsets, collection aliases, and replica-placement plugins.

  • Distributed Indexing & Search — document routing, the distributed update flow, the two-stage distributed query, and node recovery.

  • User-Managed Mode & Replication — the user-managed cluster type and leader/follower index replication.

  • Configuration & Caches — solr.xml/solrconfig.xml, the Config API, caches and autowarming, and circuit breakers/rate limiters.

  • Indexing Internals & Performance — Lucene segments and merging, transaction-log durability, docValues, and JVM/GC tuning.

  • Monitoring & Metrics — the Metrics API, the Prometheus exporter, health checks, and the Task Management API.

  • Security — security.json, authentication plugins, rule-based authorization, audit logging, and TLS/SSL.

  • Deployment & Upgrades — production readiness, Solr in Docker, backup/restore, rolling restarts, and the upgrade path.

Spring Boot integration & comparison

  • Spring Boot Integration — talking to Solr from Spring Boot with SolrJ now that Spring Data Solr is retired.

  • Solr vs. Elasticsearch — the full comparison, including licensing history and the "is Solr discontinued?" question.

Cheat sheet

  • Cheat Sheet (PDF) — a single-page, printable summary of everything in this section, with a downloadable PDF.

Bibliography