DataStax Help Center

HOW TO - Setup the Luke request handler in Solr to examine indexes


In some cases when looking into an issue with DSE solr, it may be useful to setup the "Luke" request handler. This article gives an example of how to achieve this


1 - Modify the solrconfig.xml to comment in the following line:

<requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />

2 - Reload the core


A useful example is to see what is in the index for a given document. Firstly find the unique key which is shown in your schema.xml file for example:


Then use this field to find a list of the unique keys:*%3A*&fl=id&wt=json&indent=true

The output will look similar to this


These ids can then be used to query the index like so:

The output will look similar to this (showing just a small section):

<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">2</int>
<lst name="index">
<int name="numDocs">257</int>
<int name="maxDoc">257</int>
<int name="deletedDocs">0</int>
<long name="indexHeapUsageBytes">72050</long>
<long name="version">47</long>
<int name="segmentCount">3</int>
<bool name="current">true</bool>
<bool name="hasDeletions">false</bool>
<str name="directory"> lockFactory=NativeFSLockFactory@/var/lib/cassandra/data/
<lst name="userData"/>
<lst name="doc">
<int name="docId">0</int>
<lst name="lucene">
<lst name="id">
<str name="type">string</str>
<str name="schema">I-SD----OF------</str>
<str name="flags">ITS-----OF------</str>
<str name="value">23739980</str>
<str name="internal">23739980</str>
<float name="boost">1.0</float>
<int name="docFreq">1</int>

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk