{"id":5456,"date":"2017-10-01T13:07:49","date_gmt":"2017-10-01T13:07:49","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=5456"},"modified":"2017-10-01T13:07:49","modified_gmt":"2017-10-01T13:07:49","slug":"adding-solr-get-handler","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/adding-solr-get-handler\/","title":{"rendered":"Adding Solr &#8220;\/get&#8221; handler"},"content":{"rendered":"<p>This request handler is the &#8220;realtime get&#8221; handler, and it is missing from some of the documentation, but available in Solrj.<\/p>\n<p>To use it, add this to your solrconfig.xml:<\/p>\n<pre>\n&lt;requestHandler name=\"\/get\" class=\"solr.RealTimeGetHandler\">\n  &lt;lst name=\"defaults\">\n    &lt;str name=\"omitHeader\">true&lt;\/str>\n  &lt;\/lst>\n&lt;\/requestHandler>\n<\/pre>\n<p>And make sure this block is uncommented in the update handler:<\/p>\n<pre>\n    &lt;updateLog class=\"solr.FSUpdateLog\">\n      &lt;str name=\"dir\">${solr.data.dir:}&lt;\/str>\n    &lt;\/updateLog>\n<\/pre>\n<p>Once configured, you should be able to access the \/get endpoint (you&#8217;ll see an empty JSON object returned)<\/p>\n<pre>\nhttp:\/\/localhost:8983\/solr\/articles\/get\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Using the solr realtime get handler<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[517],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5456"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=5456"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5456\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=5456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=5456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=5456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}