Hi,

  I've to intercept every request to solr (search and update) and log
some performance numbers. In order to do so I tried a Servlet filter
and added this to Solr's web.xml,

          <filter>
                <filter-name>IndexFilter</filter-name>

<filter-class>com.xxx.index.filter.IndexRequestFilter</filter-class>
                <init-param>
                        <param-name>test-param</param-name>
                        <param-value>This parameter is for
testing.</param-value>
                </init-param>
        </filter>
        <filter-mapping>
                <filter-name>IndexFilter</filter-name>
               <!--<url-pattern>/*</url-pattern> -->
             <servlet-name>SolrUpdate</servlet-name>
             <servlet-name>SolrServer</servlet-name>
        </filter-mapping>

but, this doesn't seem to be working. Couple of questions,

1) What's wrong with my web.xml setting?
2) Is there any easier way to intercept calls to Solr without changing
its web.xml? Basically can I just change the solrconfig.xml to do so
(beside requesthandlers) so I don't have to customize the solr.war?

Thanks,
-vivek

Reply via email to