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 Bent Jensen <be...@yahoo.com> on 2011/11/20 17:53:22 UTC

how to transform a URL (newbie question)

I am a beginner to solr and need to ask the following:
Using the apache-solr example, how can I display an url in the xml document
as an active link/url in http? Do i need to add some special transform in
the example.xslt file? 

thanks
Ben
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1869 / Virus Database: 2092/4628 - Release Date: 11/20/11


Re: how to transform a URL (newbie question)

Posted by Erick Erickson <er...@gmail.com>.
I think you're confusing Solr with a web app <G>....

Solr itself has nothing to do whatsoever with presenting
things to the user. It just returns, as you have seen,
XML (or JSON or ....) formatted replies. It's up to the
application layer to do something intelligent with those.

That said, the /browse request handler that ships with the
example code uses something
called the VelocityResponseWriter to render pages, where
the VeolcityResponseWriter interacts with the templates
Erik Hatcher mentioned to show you pages. So think of
all the Velocity stuff as your app engine for demo purposes.

Erik is directing you at that code if you want to hack the
Solr example to display stuff.

Hope that helps
Erick (not Hatcher <G>)

On Sun, Nov 20, 2011 at 2:15 PM, Bent Jensen <be...@yahoo.com> wrote:
> Erik,
> OK, I will look at that. Basically, what I amtrying to do is to index a
> document with lots of URLs. I also index the url and give it a field type.
> Don't know much about solr yet, but though maybe I can transform the url to
> an active link, i.e. '<a href>'. I tried putting the href into the xml
> document, but it just prints out as text in html. I also could not find any
> xslt transform or schema.
>
> thanks
> Ben
>
> -----Original Message-----
> From: Erik Hatcher [mailto:erik.hatcher@gmail.com]
> Sent: Sunday, November 20, 2011 9:05 AM
> To: solr-user@lucene.apache.org
> Subject: Re: how to transform a URL (newbie question)
>
> Ben,
>
> Not quite sure how to interpret what you're asking here.  Are you speaking
> of the /browse view?  If so, you can tweak the templates under conf/velocity
> to make links out of things.
>
> But generally, it's the end application that would take the results from
> Solr and render links as appropriate.
>
>        Erik
>
> On Nov 20, 2011, at 11:53 , Bent Jensen wrote:
>
>> I am a beginner to solr and need to ask the following:
>> Using the apache-solr example, how can I display an url in the xml
> document
>> as an active link/url in http? Do i need to add some special transform in
>> the example.xslt file?
>>
>> thanks
>> Ben
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2012.0.1869 / Virus Database: 2092/4628 - Release Date: 11/20/11
>>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1869 / Virus Database: 2092/4628 - Release Date: 11/20/11
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1869 / Virus Database: 2092/4628 - Release Date: 11/20/11
>
>

RE: how to transform a URL (newbie question)

Posted by Bent Jensen <be...@yahoo.com>.
Erik,
OK, I will look at that. Basically, what I amtrying to do is to index a
document with lots of URLs. I also index the url and give it a field type.
Don't know much about solr yet, but though maybe I can transform the url to
an active link, i.e. '<a href>'. I tried putting the href into the xml
document, but it just prints out as text in html. I also could not find any
xslt transform or schema.

thanks
Ben

-----Original Message-----
From: Erik Hatcher [mailto:erik.hatcher@gmail.com] 
Sent: Sunday, November 20, 2011 9:05 AM
To: solr-user@lucene.apache.org
Subject: Re: how to transform a URL (newbie question)

Ben, 

Not quite sure how to interpret what you're asking here.  Are you speaking
of the /browse view?  If so, you can tweak the templates under conf/velocity
to make links out of things.

But generally, it's the end application that would take the results from
Solr and render links as appropriate.

	Erik

On Nov 20, 2011, at 11:53 , Bent Jensen wrote:

> I am a beginner to solr and need to ask the following:
> Using the apache-solr example, how can I display an url in the xml
document
> as an active link/url in http? Do i need to add some special transform in
> the example.xslt file? 
> 
> thanks
> Ben
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1869 / Virus Database: 2092/4628 - Release Date: 11/20/11
> 

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1869 / Virus Database: 2092/4628 - Release Date: 11/20/11
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1869 / Virus Database: 2092/4628 - Release Date: 11/20/11


Re: how to transform a URL (newbie question)

Posted by Erik Hatcher <er...@gmail.com>.
Ben, 

Not quite sure how to interpret what you're asking here.  Are you speaking of the /browse view?  If so, you can tweak the templates under conf/velocity to make links out of things.

But generally, it's the end application that would take the results from Solr and render links as appropriate.

	Erik

On Nov 20, 2011, at 11:53 , Bent Jensen wrote:

> I am a beginner to solr and need to ask the following:
> Using the apache-solr example, how can I display an url in the xml document
> as an active link/url in http? Do i need to add some special transform in
> the example.xslt file? 
> 
> thanks
> Ben
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1869 / Virus Database: 2092/4628 - Release Date: 11/20/11
>