Implicit Request Handlers

Solr ships with many out-of-the-box request handlers, which are called implicit because they do not need to be configured in solrconfig.xml before you are able to use them.

Each implicit handler ships with a named bundle of default, invariant, and appended parameters - a paramset - equivalent to the <defaults>, <invariants>, and <appends> blocks you’d normally write into a <requestHandler> definition in solrconfig.xml. Because implicit handlers have no entry in solrconfig.xml to edit directly, their paramset (shown for each handler below, e.g. _ADMIN_PING for the Ping handler) is the only way to override their parameters - see How to View Implicit Handler Paramsets and How to Edit Implicit Handler Paramsets below.

Available Implicit Endpoints

All endpoint paths listed below should be placed after Solr’s host and port (if a port is used) to construct a URL.
V2 paths that start with api/collections/ exist only in SolrCloud mode. In user-managed mode use the api/cores/<core>/…​ form of the same endpoint.

Admin Handlers

Many of these handlers are used throughout the Admin UI to show information about Solr.

File

Return content of files in ${solr.home}/conf/. This handler must have a collection name in the path to the endpoint.

Documentation: Restricting File Access

solr/<collection>/admin/file

Paramset: _ADMIN_FILE

Health

Report the health of the node.

Documentation: Healthchecks

  • V1 API

  • V2 API

solr/admin/info/health
api/node/health

Paramset: none

Logging

Retrieve and modify registered loggers.

  • V1 API

  • V2 API

solr/admin/info/logging
api/node/logging/levels

The log messages kept in memory come from solr/admin/info/logging?since=0 in V1 and from api/node/logging/messages?since=0 in V2. In the response, history is a document list with the messages under docs in V1, and a plain array of messages in V2.

Paramset: none

Luke

Expose the internal Lucene index. This handler must have a collection name in the path to the endpoint.

Documentation: Luke Request Handler

solr/<collection>/admin/luke

Paramset: _ADMIN_LUKE

Ping

Health check designed for use by a load balancer. This handler must have a collection name in the path to the endpoint.

PingRequestHandler is deprecated and will be removed in a future release. Use the Health endpoint above instead.

Documentation: Ping

solr/<collection>/admin/ping

Paramset: _ADMIN_PING

System Properties

Return JRE system properties. Secret values are redacted.

Documentation: Java Properties Screen

  • V1 API

  • V2 API

solr/admin/info/properties

To fetch a single property, use a name query parameter:

solr/admin/info/properties?name=java.version
api/node/properties

To fetch a single property, use a path segment:

api/node/properties/java.version

Paramset: none

Segments

Return info on last commit generation Lucene index segments.

  • V1 API

  • V2 API

solr/<collection>/admin/segments
api/cores/<core>/segments

Paramset: _ADMIN_SEGMENTS

Core Info

Return core information.

Documentation: Core Info Handler

solr/<collection>/admin/info

Paramset: _ADMIN_CORE

Threads

Return info on all JVM threads.

  • V1 API

  • V2 API

solr/admin/info/threads

Abbreviated JSON response with the default json.nl=flat format. The thread dump alternates "thread" keys and thread objects:

{
  "system": {
    "threadDump": [
      "thread", {"id": 1, "name": "main", "state": "RUNNABLE"},
      "thread", {"id": 2, "name": "worker", "state": "WAITING"}
    ]
  }
}

api/node/threads

Abbreviated JSON response. The thread dump is an array of objects, each containing a "thread" property:

{
  "system": {
    "threadDump": [
      {"thread": {"id": 1, "name": "main", "state": "RUNNABLE"}},
      {"thread": {"id": 2, "name": "worker", "state": "WAITING"}}
    ]
  }
}

Paramset: none

Analysis Handlers

Document Analysis

Return a breakdown of the analysis process of the given document.

Expects a single content stream shaped like this, where every document includes a field serving as the unique key (used to associate each analysis breakdown back to its document):

<docs>
    <doc>
        <field name="id">1</field>
        <field name="name">Running Analyzers</field>
    </doc>
    <doc>...</doc>
    ...
</docs>
curl "http://localhost:8983/solr/<collection>/analysis/document" -H "Content-type:text/xml" --data-binary @mydoc.xml

The response breaks each field down by analysis stage, alternating the analyzer/filter class name with the tokens it produced (trimmed here for brevity):

{
  "analysis": {
    "1": {
      "name": {
        "index": {
          "Running Analyzers": [
            "org.apache.lucene.analysis.standard.StandardTokenizer",
            [
              {"text": "Running", "start": 0, "end": 7, "position": 1},
              {"text": "Analyzers", "start": 8, "end": 17, "position": 2}
            ],
            "org.apache.lucene.analysis.core.LowerCaseFilter",
            [
              {"text": "running", "start": 0, "end": 7, "position": 1},
              {"text": "analyzers", "start": 8, "end": 17, "position": 2}
            ]
          ]
        }
      }
    }
  }
}

Also supports query-time analysis via an analysis.query or q parameter, plus analysis.showmatch=true to mark matching field tokens with "match": true.

solr/<collection>/analysis/document

Paramset: _ANALYSIS_DOCUMENT

Field Analysis

Return index- and query-time analysis over the given field(s)/field type(s). This handler drives the Analysis Screen in Solr’s Admin UI.

Parameter Description

analysis.fieldname

Analyze based on this field’s type. Accepts a comma-separated list.

analysis.fieldtype

Analyze based on this field type. Accepts a comma-separated list.

analysis.fieldvalue

Text to analyze, mimicking index-time analysis.

analysis.query / q

Text to analyze, mimicking query-time analysis. analysis.query takes precedence over q.

analysis.showmatch

When true and query analysis is performed, marks field-value tokens that match the query’s tokens.

If neither analysis.fieldname nor analysis.fieldtype is given, the default search field’s analyzer is used; one of analysis.fieldvalue, analysis.query, or q is required.

solr/<collection>/analysis/field

Paramset: _ANALYSIS_FIELD

Handlers for Configuration

Config API

Retrieve and modify Solr configuration.

Documentation: Config API

  • V1 API

  • V2 API

solr/<collection>/config
api/collections/<collection>/config

Paramset: _CONFIG

Dump

Echo the request contents back to the client. This handler must have a collection name in the path to the endpoint.

solr/<collection>/debug/dump

Paramset: _DEBUG_DUMP

Replication

Replicate indexes for SolrCloud recovery and user-managed cluster index distribution. This handler must have a core name in the path to the endpoint.

solr/<core>/replication

Paramset: _REPLICATION

Schema API

Retrieve and modify the Solr schema.

Documentation: Schema API

  • V1 API

  • V2 API

solr/<collection>/schema
solr/<core>/schema
api/collections/<collection>/schema
api/cores/<core>/schema

Paramset: _SCHEMA

Query Handlers

Export

Export full sorted result sets.

Documentation: Exporting Result Sets

solr/<collection>/export

Paramset: _EXPORT

RealTimeGet

Low-latency retrieval of the latest version of a document.

Documentation: RealTime Get

  • V1 API

  • V2 API

solr/<collection>/get
api/collections/<collection>/get

Paramset: _GET

Graph Traversal

Return GraphML formatted output from a gatherNodes streaming expression.

Documentation: Graph Traversal

solr/<collection>/graph

Paramset: _ADMIN_GRAPH

SQL

SQL query support.

This handler is part of the sql Solr Module, which must be enabled before the endpoint responds.

Documentation: SQL Request Handler

solr/<collection>/sql

Paramset: _SQL

Streaming Expressions

Distributed stream processing.

solr/<collection>/stream

Paramset: _STREAM

Terms

Return a field’s indexed terms and the number of documents containing each term.

solr/<collection>/terms

Paramset: _TERMS

Task List

List the active cancellable tasks, or check whether one task is still active. This handler must have a collection name in the path to the endpoint.

Documentation: Task Management

  • V1 API

  • V2 API

solr/<collection>/tasks/list
api/collections/<collection>/tasks

Paramset: _LIST_TASKS

Task Cancellation

Cancel an active task by its ID. This handler must have a collection name in the path to the endpoint.

Documentation: Task Management

  • V1 API

  • V2 API

solr/<collection>/tasks/cancel
api/collections/<collection>/tasks/<task_id>

Paramset: _TASK_CANCELLATION

Update Handlers

Update

Add, delete and update indexed documents formatted as SolrXML, CSV, SolrJSON or javabin.

  • V1 API

  • V2 API

solr/<collection>/update
api/collections/<collection>/update

Paramset: _UPDATE

CSV Updates

Add and update CSV-formatted documents.

  • V1 API

  • V2 API

solr/<collection>/update/csv
api/collections/<collection>/update/csv

Paramset: _UPDATE_CSV

JSON Updates

Add, delete and update SolrJSON-formatted documents.

  • V1 API

  • V2 API

solr/<collection>/update/json
api/collections/<collection>/update/json

Paramset: _UPDATE_JSON

Custom JSON Updates

Add and update custom JSON-formatted documents.

Both the v2 /update and /update/json endpoints above are internally rewritten to this path, which is why it has no distinct v2 endpoint of its own.

solr/<collection>/update/json/docs

Paramset: _UPDATE_JSON_DOCS

CBOR Updates

Add and update CBOR-formatted documents.

solr/<collection>/update/cbor

Paramset: _UPDATE_CBOR

How to View Implicit Handler Paramsets

You can see configuration for all request handlers, including the implicit request handlers, via the Config API.

To include the expanded paramset in the response, as well as the effective parameters from merging the paramset parameters with the built-in parameters, use the expandParams request parameter.

For example, for the /export request handler, you can make a request like this:

  • V1 API

  • V2 API

http://localhost:8983/solr/gettingstarted/config/requestHandler?componentName=/export&expandParams=true
http://localhost:8983/api/collections/gettingstarted/config/requestHandler?componentName=/export&expandParams=true

The response will look similar to:

{
  "config": {
    "requestHandler": {
      "/export": {
        "class": "solr.ExportHandler",
        "useParams": "_EXPORT",
        "components": ["query"],
        "defaults": {
          "wt": "json"
        },
        "invariants": {
          "rq": "{!xport}",
          "distrib": false
        },
        "name": "/export",
        "_useParamsExpanded_": {
          "_EXPORT": "[NOT AVAILABLE]"
        },
        "_effectiveParams_": {
          "distrib": "false",
          "omitHeader": "true",
          "wt": "json",
          "rq": "{!xport}"
        }
      }
    }
  }
}

How to Edit Implicit Handler Paramsets

Because implicit request handlers are not present in solrconfig.xml, configuration of their associated default, invariant and appends parameters may be edited via the Request Parameters API using the Paramset listed in each handler’s entry above. See The useParams Parameter to override a paramset at request time instead of editing it. However, other parameters, including SearchHandler components, may not be modified. The invariants and appends specified in the implicit configuration cannot be overridden.

How to Disable an Implicit Handler

You may want to disable the loading of an implicit handler. This is supported by remapping the name of the handler to the NoOpRequestHandler in solrconfig.xml, which will return a 403 FORBIDDEN status code.

For example, to disable the /update/csv handler you would re-define it in solrconfig.xml as:

<requestHandler name="/update/csv" class="solr.NoOpRequestHandler"></requestHandler>