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 Finotti Simone <te...@yoox.com> on 2011/10/06 09:54:19 UTC

URL Redirect

Hello,

I have been assigned the task to migrate from Endeca to Solr.

The former engine allowed me to set keyword triggers that, when matched exactly, caused the web client to redirect to a specified URL.

Does that feature exist in Solr? If so, where can I get some info?

Thank you

Re: URL Redirect

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello,

See http://search-lucene.com/?q=query+elevation 

I think that's the closest thing to what you need.  It doesn't do the redirect, but this is something that's easily doable in your app with a little <query> => <URL> mapping

Otis
----

Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/


----- Original Message -----
> From: Finotti Simone <te...@yoox.com>
> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
> Cc: 
> Sent: Thursday, October 6, 2011 3:54 AM
> Subject: URL Redirect
> 
> Hello,
> 
> I have been assigned the task to migrate from Endeca to Solr.
> 
> The former engine allowed me to set keyword triggers that, when matched exactly, 
> caused the web client to redirect to a specified URL.
> 
> Does that feature exist in Solr? If so, where can I get some info?
> 
> Thank you
>

Re: URL Redirect

Posted by Paul Libbrecht <pa...@hoplahup.net>.
Simone,

for such a work you need something external I think.

I would use Apache's mod_rewrite which is super flexible for such purposes.
Among others it can honour existing URL by either serving them reformulated (e.g. proxied) or by redirecting the browser to use it.
Probably something as flexible exists in the servlet world, I do not know.

For lack of using it, we created something of a "redirect servlet" for i2geo.net (see http://svn.activemath.org/intergeo/Platform/RootWebapp/ ) it is really a basic routine to redirect chosen URLs to chosen places (see also the neighbour project ServletUtils).

paul


Le 6 oct. 2011 à 09:54, Finotti Simone a écrit :

> Hello,
> 
> I have been assigned the task to migrate from Endeca to Solr.
> 
> The former engine allowed me to set keyword triggers that, when matched exactly, caused the web client to redirect to a specified URL.
> 
> Does that feature exist in Solr? If so, where can I get some info?
> 
> Thank you


Re: URL Redirect

Posted by Erik Hatcher <er...@gmail.com>.
I would personally implement this in the app tier, above Solr.  

One way to do it using Solr to match keywords to URLs is to index special "redirect" documents with the keywords in the search field (either in the main index, or in a separate core index).  

But there is nothing magically built into Solr, at the moment, to do what you're asking out of the box. 

I'm curious what other tasks are tedious about migrating from Endeca to Solr.  

	Erik



On Oct 28, 2011, at 23:40 , prr wrote:

> Finotti Simone <tech178 <at> yoox.com> writes:
> 
>> 
>> Hello,
>> 
>> I have been assigned the task to migrate from Endeca to Solr.
>> 
>> The former engine allowed me to set keyword triggers that, when matched
> exactly, caused the web client to
>> redirect to a specified URL.
>> 
>> Does that feature exist in Solr? If so, where can I get some info?
>> 
>> Thank you
> 
> 
> 
> Hi, Iam also looking out for migrating from Endeca to Solr , but on the first
> look it looks extremely tedious to me ...please pass on any tips or how to
> approach the problem..
> 
> 
> 


Re: URL Redirect

Posted by prr <pr...@gmail.com>.
Finotti Simone <tech178 <at> yoox.com> writes:

> 
> Hello,
> 
> I have been assigned the task to migrate from Endeca to Solr.
> 
> The former engine allowed me to set keyword triggers that, when matched
exactly, caused the web client to
> redirect to a specified URL.
> 
> Does that feature exist in Solr? If so, where can I get some info?
> 
> Thank you



Hi, Iam also looking out for migrating from Endeca to Solr , but on the first
look it looks extremely tedious to me ...please pass on any tips or how to
approach the problem..




R: URL Redirect

Posted by Finotti Simone <te...@yoox.com>.
Hi,
for those who may be interested, I resolved it (with a little help from urlrewrite user group :-) ) by using type="proxy" rule.

S

________________________________________
Inizio: Finotti Simone [tech178@yoox.com]
Inviato: venerdì 7 ottobre 2011 11.38
Fine: solr-user@lucene.apache.org
Oggetto: R: URL Redirect

Ok,
so I installed tucky on Tomcat 6.0. I have the following configuration:

/solr-p <- the solr configuration
/solr  <- the tucky configuration

I want to redirect request such as
http://localhost:8080/solr/select/?q=Somename&...
to a different address, and this is promptly done with rule:

    <rule>
        <!-- name is useful for debugging purpose -->

        <name>RuleAlessi</name>
        <from>^/select/\?q=[Aa]lessi&amp;.*$</from>
        <to last="true" type="redirect" >/design/searchresult.asp/ene_m/4294950939/dept/design/</to>
    </rule>

I have many of these rule and they works. If none of these rules are matched, I want to *forward* request
http://localhost:8080/solr/select/?q=NonMatchedQuery&...
to
http://localhost:8080/solr-p/select/?q=NonMatchedQuery&...

It works with the following rule:

    <rule>
        <name>LastRule</name>
        <from>/(.*)</from>
        <to type="redirect">/solr-p/$1</to>
    </rule>

but it shows me on the browser's address bar the 'solr-p' thing, and this is not desired. If I change the rule to

    <rule>
        <name>LastRule</name>
        <from>/(.*)</from>
        <to context="solr-p">/$1</to>
    </rule>

it seems that the forwarding is done correctly, but the answer to http://localhost:8080/solr/admin/ is

HTTP Status 400 - Missing solr core name in path

while if I access to http://localhost:8080/solr-p/admin/ it works as expected.

According to Tomcat's log files, it seems that the forwarding is done correctly.

Please, could anybody explain me what's going on there?

Thanks

________________________________________
Inizio: Ranveer Kumar [ranveer.solr@gmail.com]
Inviato: giovedì 6 ottobre 2011 10.21
Fine: solr-user@lucene.apache.org
Oggetto: Re: URL Redirect

Tucky can also help you if you are u
Sing java..
On Oct 6, 2011 1:24 PM, "Finotti Simone" <te...@yoox.com> wrote:
> Hello,
>
> I have been assigned the task to migrate from Endeca to Solr.
>
> The former engine allowed me to set keyword triggers that, when matched
exactly, caused the web client to redirect to a specified URL.
>
> Does that feature exist in Solr? If so, where can I get some info?
>
> Thank you







R: URL Redirect

Posted by Finotti Simone <te...@yoox.com>.
Ok,
so I installed tucky on Tomcat 6.0. I have the following configuration:

/solr-p <- the solr configuration
/solr  <- the tucky configuration

I want to redirect request such as
http://localhost:8080/solr/select/?q=Somename&...
to a different address, and this is promptly done with rule:

    <rule>
        <!-- name is useful for debugging purpose -->
        
        <name>RuleAlessi</name>
        <from>^/select/\?q=[Aa]lessi&amp;.*$</from>
        <to last="true" type="redirect" >/design/searchresult.asp/ene_m/4294950939/dept/design/</to>
    </rule>

I have many of these rule and they works. If none of these rules are matched, I want to *forward* request
http://localhost:8080/solr/select/?q=NonMatchedQuery&...
to 
http://localhost:8080/solr-p/select/?q=NonMatchedQuery&...

It works with the following rule:

    <rule>
        <name>LastRule</name>
        <from>/(.*)</from>
        <to type="redirect">/solr-p/$1</to>
    </rule>

but it shows me on the browser's address bar the 'solr-p' thing, and this is not desired. If I change the rule to

    <rule>
        <name>LastRule</name>
        <from>/(.*)</from>
        <to context="solr-p">/$1</to>
    </rule>

it seems that the forwarding is done correctly, but the answer to http://localhost:8080/solr/admin/ is

HTTP Status 400 - Missing solr core name in path

while if I access to http://localhost:8080/solr-p/admin/ it works as expected.

According to Tomcat's log files, it seems that the forwarding is done correctly. 

Please, could anybody explain me what's going on there? 

Thanks

________________________________________
Inizio: Ranveer Kumar [ranveer.solr@gmail.com]
Inviato: giovedì 6 ottobre 2011 10.21
Fine: solr-user@lucene.apache.org
Oggetto: Re: URL Redirect

Tucky can also help you if you are u
Sing java..
On Oct 6, 2011 1:24 PM, "Finotti Simone" <te...@yoox.com> wrote:
> Hello,
>
> I have been assigned the task to migrate from Endeca to Solr.
>
> The former engine allowed me to set keyword triggers that, when matched
exactly, caused the web client to redirect to a specified URL.
>
> Does that feature exist in Solr? If so, where can I get some info?
>
> Thank you



Re: URL Redirect

Posted by Ranveer Kumar <ra...@gmail.com>.
Tucky can also help you if you are u
Sing java..
On Oct 6, 2011 1:24 PM, "Finotti Simone" <te...@yoox.com> wrote:
> Hello,
>
> I have been assigned the task to migrate from Endeca to Solr.
>
> The former engine allowed me to set keyword triggers that, when matched
exactly, caused the web client to redirect to a specified URL.
>
> Does that feature exist in Solr? If so, where can I get some info?
>
> Thank you