Adding Solr “/get” handler

This request handler is the “realtime get” handler, and it is missing from some of the documentation, but available in Solrj.

To use it, add this to your solrconfig.xml:

<requestHandler name="/get" class="solr.RealTimeGetHandler">
  <lst name="defaults">
    <str name="omitHeader">true</str>
  </lst>
</requestHandler>

And make sure this block is uncommented in the update handler:

    <updateLog class="solr.FSUpdateLog">
      <str name="dir">${solr.data.dir:}</str>
    </updateLog>

Once configured, you should be able to access the /get endpoint (you’ll see an empty JSON object returned)

http://localhost:8983/solr/articles/get

Leave a Reply

Your email address will not be published. Required fields are marked *