1

I am trying to setup /browse functionality of solr, referring this documentation. I have done the following

  1. Added velocity-1.7.jar, velocity-tools-2.0.jar, commons-beanutils-1.8.3.jar, commons-collections-3.2.2.jar to lib directory in my solrhome
  2. added

    <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"> <str name="template.base.dir">${velocity.template.base.dir:}</str> <!-- <str name="init.properties.file">velocity-init.properties</str> <bool name="params.resource.loader.enabled">true</bool> <bool name="solr.resource.loader.enabled">false</bool> <lst name="tools"> <str name="mytool">com.example.MyCustomTool</str> </lst> --> </queryResponseWriter> to solrconfig.xml

raj247
  • 381
  • 1
  • 4
  • 21
  • Are the jars actually being loaded? Check the output at the start in the log file to see which files are being loaded. What is the exact error message? – MatsLindh May 17 '18 at 19:28
  • I see this message so I assumet the jars are being loaded successfully. `2018-05-17 20:07:54.148 INFO (main) [ ] o.a.s.c.SolrResourceLoader [null] Added 8 libs to classloader, from paths: [/Users/solr-6.5.1/solrhome/lib] ` I get this error `Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.VelocityResponseWriter'` Also when I untar the jars and look for VelocityResponseWriter.class I am unable to find it. @MatsLindh – raj247 May 17 '18 at 20:34
  • 2
    Ah, the Solr response writer isn't part of the `contrib/` directory - that's just the external dependencies. You need `solr-velocity-7.3.1.jar` located under `dist` in the binary zip. Try that one. – MatsLindh May 17 '18 at 22:30
  • ah.. that fixed the error.. I wonder why have they not mentioned about `dist` in the documentation.. but now when I try to load `http://localhost:8983/solr/#/collection_name/browse` its not loading anything instead the page just redirects to `http://localhost:8983/solr/#/` – raj247 May 18 '18 at 15:17
  • @MatsLindh Do I need to perform any additional step for it to work? – raj247 May 22 '18 at 15:00
  • 1
    That's not the URL for the velocity interface - it's /solr/collection/browse - no anchors - those are just for the admin interface. – MatsLindh May 22 '18 at 16:22

0 Answers0