You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jérôme Etévé <je...@gmail.com> on 2008/12/17 12:56:54 UTC

Re: AW: Cross-context-forward to solr-instance

Hi Lance,

 Can you tell us what's this parameter and how to set it ?

 I'm also stucked with the same problem :(

 Thanks !!

 Jerome


On Mon, Sep 8, 2008 at 6:02 PM, Lance Norskog <go...@gmail.com> wrote:
> You can give a default core set by adding a default parameter to the query
> in solrconfig.xml. This is hacky, but it gives you a set of cores instead of
> just one core.
>
> -----Original Message-----
> From: David Smiley @MITRE.org [mailto:DSMILEY@mitre.org]
> Sent: Monday, September 08, 2008 7:54 AM
> To: solr-user@lucene.apache.org
> Subject: Re: AW: Cross-context-forward to solr-instance
>
>
> FWIW, I'm also using the SolrRequestFilter for forwards, despite the
> warning.
> Solr1.3 doesn't have the concept of a default core anymore yet I want this
> feature.  I made an uber-simple JSP like this:
> <jsp:forward page="<%= "mycorename/select?" + request.getQueryString() %>"
> />
> And so now my clients don't need to update their URL just because I've
> migrated to Solr 1.3.  Oh, I needed to set up the dispatcher FORWARD as you
> mentioned and I also remapped the /select/* servlet mapping to my jsp.:
>  <servlet>
>    <servlet-name>selectDefaultCore</servlet-name>
>    <jsp-file>/selectDefaultCore.jsp</jsp-file>
>  </servlet>
>
>  <servlet-mapping>
>    <servlet-name>selectDefaultCore</servlet-name>
>    <url-pattern>/select/*</url-pattern>
>  </servlet-mapping>
>
> The only problem I've seen so far is that if I echo the params
> (echoParams=all), I see the output doubled.  Weird but inconsequential.
>
> ~ David Smiley
>
>
> Hachmann wrote:
>>
>> Hi,
>>
>> I made a mistake. At least with Tomcat 5.5.x, if you configure the
>> SolrRequestFilter with <dispatcher>FORWARD</dispatcher> it indeed gets
>> called even when you forward from another web-context!
>>
>> Note, that the documentation says this might be problematic!
>>
>> Sorry for the previous overhasty post.
>> Björn
>>
>>> -----Ursprüngliche Nachricht-----
>>> Von:
>>> solr-user-return-13537-hachmann.bjoern=guj.de@lucene.apache.or
>>> g
>>> [mailto:solr-user-return-13537-hachmann.bjoern=guj.de@lucene.a
>> pache.org] Im Auftrag von Hachmann, Bjoern
>>> Gesendet: Samstag, 6. September 2008 08:01
>>> An: solr-user@lucene.apache.org
>>> Betreff: Cross-context-forward to solr-instance
>>>
>>> Hi,
>>>
>>> yesterday I tried the Solr-1.3-RC2 and everything seems to work fine
>>> using the traditional single-core setup. But while troubleshooting
>>> the new multi-core feature, I realized for the first time, that I
>>> have been using the deprecated (even in 1.2) class SolrServlet. This
>>> is a huge problem for us, as we run the solr-web-app parallel to our
>>> main web-app in the same servlet-container. Using this approach we
>>> can internally forward update- and select-requests to the
>>> Solr-instance currently in use.
>>>
>>> ServletContext ctx = getServletContext().getContext("solr1");
>>> RequestDispatcher rd = ctx.getNamedDispatcher("SolrServer");
>>> rd.forward(request, response);
>>>
>>> As you can see, this approach only works for the servlet named
>>> 'SolrServer' which references the deprecated class.
>>>
>>> The attempt of using a path based dispatcher
>>> (ctx.getRequestDispatcher) was not successful, even though I
>>> configured the SolrRequestFilter in the solr-web.xml to work on
>>> forwards (<dispatcher>FORWARD</dispatcher>), which the documentation
>>> discourages. Maybe this is because of the cross-context-dispatch?
>>>
>>> At the moment I ran totally out of ideas, apart from completely
>>> redesigning our whole setup. Any ideas are highly appreciated.
>>>
>>> Thanks in advance,
>>> Björn
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Cross-context-forward-to-solr-instance-tp19343349p1937
> 3757.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
>



-- 
Jerome Eteve.

Chat with me live at http://www.eteve.net

jerome@eteve.net