lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noble Paul നോബിള്‍ नोब्ळ् <noble.p...@corp.aol.com>
Subject Re: Servlet filter for Solr
Date Wed, 10 Jun 2009 04:41:11 GMT
if you wish to intercept "read" calls ,a filter is the only way.


On Wed, Jun 10, 2009 at 6:35 AM, vivek sar<vivextra@gmail.com> wrote:
> 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>

I guess you canot put servlets in the filter mapping
>        </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
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com

Mime
View raw message