Quarkus Solr Dev Service

The extension provides a dev service for Solr that automatically starts a containerised Solr instance during development and testing — no manual setup required.

Lifecycle

The dev service starts when:

  • The application runs in dev mode (quarkus dev) or during tests

  • No quarkus.solr.url is configured

  • Docker is available on the host

It stops when the dev mode session ends. On restart, a new container is started unless a shared service is configured (see Shared Dev Service).

The dev service is enabled by default. To disable it explicitly:

quarkus.solr.devservices.enabled=false

Image

By default, the dev service uses the official solr image from Docker Hub, pinned to the same version as the bundled SolrJ library. To use a different image:

quarkus.solr.devservices.image-name=solr:9.7

Collection

By default, the dev service creates a single collection named dummy. To use a different name:

quarkus.solr.devservices.collection=my-collection

Configuration

By default, the collection is created with the default Solr configuration and schema. To supply a custom schema and configuration, point to a local directory:

quarkus.solr.devservices.configuration=src/main/resources/solrconfig

The directory must contain solrconfig.xml and all files it references (such as schema.xml or managed-schema.xml).

At startup, the directory contents are zipped and uploaded to the running container via the Solr Collections API. The path is resolved relative to the project root. Changes to the configuration directory require a dev mode restart to take effect.

Shared Dev Service

By default each application gets its own Solr container. In multi-module projects you may want all modules to share a single container:

quarkus.solr.devservices.shared=true
# Optional: identify the shared instance (default is "solr")
quarkus.solr.devservices.service-name=my-shared-solr

When shared=true, Quarkus will reuse an existing container with the same service name rather than starting a new one.

Dev UI

When the dev service is running, the Solr Dev UI card at /q/dev-ui provides a direct link to the Solr Admin UI of the running container. The Admin UI URL is resolved dynamically from the running container’s mapped port — no manual configuration needed.