lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Hill" <solr-l...@zvents.com>
Subject Re: Why is Solr using a Filter for answering search requests?
Date Thu, 13 Sep 2007 18:22:58 GMT
I don't know that it's a reason not to do it, but it's definitely been more
of a pain for me.

I have a servlet that pre-processes the request, and then forwards the
request to solr.

I found I had to add

Index: web.xml
===================================================================
--- web.xml     (revision 19137)
+++ web.xml     (working copy)
@@ -44,6 +44,8 @@
   <filter-mapping>
     <filter-name>SolrRequestFilter</filter-name>
     <url-pattern>/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+    <dispatcher>FORWARD</dispatcher>
   </filter-mapping>

to make things work with the filter. Took me a while to figure it out, so I
thought I'd mention it, in case it bites anyone else.

Tom

On 9/11/07, Ryan McKinley <ryantxu@gmail.com> wrote:
>
> Peuss, Thomas wrote:
> > Hello!
> >
> > You might have seen my patch to SOLR-127.
> >
> > I have a question there: why is Solr using a filter instead of a servlet
> > to answer search requests? I have seen that it used a servlet before.
> > Why was that changed to a filter? The speed gains are minimal from my
> > point of view (at least in Tomcat).
> >
>
> We switched to a filter for flexibility not speed.  The
> SolrDispatchFilter is applied to /*, so it can _choose_ to handle a
> request on any path or pass the request on down the chain.
>
> As a filter, we can configure what paths map to what RequestHandlers in
> solrconfig.xml rather then in web.xml
>
> Any reason not to use a filter?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message