lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vivek sar <vivex...@gmail.com>
Subject Re: Servlet filter for Solr
Date Wed, 10 Jun 2009 17:07:50 GMT
I've tried both "url-pattern" (/*) and servlet-name in the filter
mapping , but none of it seem to intercept the call. If I put (/*)
only up to /solr gets intercepted. Since, I'm using multicore - calls
like /solr/core0 don't get intercepted. I want both select and update
to be monitored. Any ideas?

Thanks,
-vivek

2009/6/9 Noble Paul നോബിള്‍  नोब्ळ् <noble.paul@corp.aol.com>:
> 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