Luke Request Handler

The Luke Request Handler offers programmatic access to the information provided on the Schema Browser page of the Admin UI. It is modeled after the Luke, the Lucene Index Browser by Andrzej Bialecki. It is an implicit handler, so you don’t need to define it.

The Luke Request Handler accepts the following parameters:

The data about the index to include in the response. Options are schema, index, doc, all. index describes the high level details about the index. schema returns details about the schema plus the index data. doc works in conjunction with docId or id parameters and returns details about a specific document plus the index data.
Get a document using the uniqueKeyField specified in schema.xml.
Get a document using a Lucene documentID.
Limit the returned values to a set of fields. This is useful if you want to increase the numTerms and don’t want a massive response.
How many top terms for each field. The default is 10.
Choose whether /luke should return the index-flags for each field. Fetching and returning the index-flags for each field in the index has non-zero cost, and can slow down requests to /luke.

LukeRequestHandler Examples

The following examples assume you are running Solr’s techproducts example configuration:

bin/solr start -e techproducts

To return summary information about the index:


To return schema details about the index:


To drill into a specific field manu, then you drop the show parameter and add the fl parameter:


To see the specifics of a document using the Solr uniqueKeyField field:


Alternatively, to work through the Lucene native id:


From SolrJ, you can access /luke using the LukeRequest object.