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 JOHN JAIRO GÓMEZ LAVERDE <jj...@hotmail.com> on 2011/01/31 18:57:18 UTC

CUSTOM JSP FOR APACHE SOLR


SOLR LUCENE
DEVELOPERS

Hi i am new to solr and i like to make a custom search page for enterprise users
in JSP that takes the results of Apache Solr.

- Where i can find some useful examples for that topic ?
- Is JSP the correct approach to solve mi requirement ?
- If not what is the best solution to build a customize search page for my users?

Thanks
from South America

JOHN JAIRO GOMEZ LAVERDE
Bogotá - Colombia
 		 	   		  

Re: CUSTOM JSP FOR APACHE SOLR

Posted by Erik Hatcher <er...@gmail.com>.
On Feb 1, 2011, at 08:58 , Estrada Groups wrote:

> Has anyone noticed the rails application that installs with Solr4.0? I am interested to hear some feedback on that one...

I guess you're talking about the client/ruby/flare stuff?   It's been untouched for quite a while and has not been upgraded to Rails3.  It still works, and has a lot of (in my biased opinion! :) slick features that folks can borrow from.  At one point Koji had a public demo site using it that I thought was way cool.  Flare was used as a basis for the initial version of Blacklight <http://projectblacklight.org/>.  Blacklight has since evolved dramatically into a very full featured (and mostly general purpose) way cool front-end to Solr.

I still sometimes fire up Flare for demonstration purposes (saved searches that become facet.query's, Simile Timeline integration, and pie charts demo nicely).

At this point, Flare is as-is... try it out if you are Ruby/Rails savvy.

	Erik


Re: CUSTOM JSP FOR APACHE SOLR

Posted by Estrada Groups <es...@gmail.com>.
Has anyone noticed the rails application that installs with Solr4.0? I am interested to hear some feedback on that one...

Adam


On Jan 31, 2011, at 4:25 PM, Paul Libbrecht <pa...@hoplahup.net> wrote:

> Tomas,
> 
> I also know velocity can be used and works well.
> I would be interested to a simpler way to have the objects of SOLR available in a jsp than write a custom jsp processor as a request handler; indeed, this seems to be the way solrj is expected to be used in the wiki page.
> 
> Actually I migrated to velocity (which I like less than jsp) just because I did not find a response to this question.
> 
> paul
> 
> 
> Le 31 janv. 2011 à 21:53, Tomás Fernández Löbbe a écrit :
> 
>> Hi John, you can use whatever you want for building your application, using
>> Solr on the backend (JSP included). You should find all the information you
>> need on Solr's wiki page:
>> http://wiki.apache.org/solr/
>> 
>> <http://wiki.apache.org/solr/>including some client libraries to easy
>> integrate your application with Solr:
>> http://wiki.apache.org/solr/IntegratingSolr
>> 
>> <http://wiki.apache.org/solr/IntegratingSolr>for fast prototyping you could
>> use Velocity:
>> http://wiki.apache.org/solr/VelocityResponseWriter
>> 
>> <http://wiki.apache.org/solr/VelocityResponseWriter>Anyway, I recommend you
>> to start with Solr's tutorial:
>> http://lucene.apache.org/solr/tutorial.html
>> 
>> 
>> Good luck,
>> <http://lucene.apache.org/solr/tutorial.html>Tomás
>> 
>> 2011/1/31 JOHN JAIRO GÓMEZ LAVERDE <jj...@hotmail.com>
>> 
>>> 
>>> 
>>> SOLR LUCENE
>>> DEVELOPERS
>>> 
>>> Hi i am new to solr and i like to make a custom search page for enterprise
>>> users
>>> in JSP that takes the results of Apache Solr.
>>> 
>>> - Where i can find some useful examples for that topic ?
>>> - Is JSP the correct approach to solve mi requirement ?
>>> - If not what is the best solution to build a customize search page for my
>>> users?
>>> 
>>> Thanks
>>> from South America
>>> 
>>> JOHN JAIRO GOMEZ LAVERDE
>>> Bogotá - Colombia
>>> 
> 

Re: CUSTOM JSP FOR APACHE SOLR

Posted by Paul Libbrecht <pa...@hoplahup.net>.
From looking at the source, I see only the following option available for me to write search results displaying jsp's: adjust SolrDispatchFilter to treat a JspResponseWriter specially by:
- enriching the http-request with the search queries and reponses
- forward the request down the chain

It sounds bit difficult a modification of SolrDispatchFilter but it sounds to me to be useful (I would get all the webapp services in my jsp, e.g. for i18n, sessions, ...).

It would also allow other implementations such as servlets.

Thanks in advance to advice if it's a good or bad thing to do.

paul


Le 24 févr. 2011 à 23:47, Paul Libbrecht a écrit :

> Hello list,
> 
> as suggested below, I tried to implement a custom ResponseWriter that would evaluate a JSP but that seems impossible: the HttpServletRequest and the HttpServletResponse are not available anymore.
> 
> Have I missed something?
> Should I rather do a RequestHandler?
> Does anyone know an artificial way to run a JSP? (I rather not like it).
> 
> thanks in advance
> 
> paul
> 
> 
> Le 2 févr. 2011 à 20:42, Tomás Fernández Löbbe a écrit :
> 
>> Hi Paul, I don't fully understand what you want to do. The way, I think,
>> SolrJ is intended to be used is from a client application (outside Solr). If
>> what you want is something like what's done with Velocity I think you could
>> implement a response writer that renders the JSP and send it on the
>> response.
>> 
>> Tomás
>> 
>> 
>> On Mon, Jan 31, 2011 at 6:25 PM, Paul Libbrecht <pa...@hoplahup.net> wrote:
>> 
>>> Tomas,
>>> 
>>> I also know velocity can be used and works well.
>>> I would be interested to a simpler way to have the objects of SOLR
>>> available in a jsp than write a custom jsp processor as a request handler;
>>> indeed, this seems to be the way solrj is expected to be used in the wiki
>>> page.
>>> 
>>> Actually I migrated to velocity (which I like less than jsp) just because I
>>> did not find a response to this question.
>>> 
>>> paul
>>> 
>>> 
>>> Le 31 janv. 2011 à 21:53, Tomás Fernández Löbbe a écrit :
>>> 
>>>> Hi John, you can use whatever you want for building your application,
>>> using
>>>> Solr on the backend (JSP included). You should find all the information
>>> you
>>>> need on Solr's wiki page:
>>>> http://wiki.apache.org/solr/
>>>> 
>>>> <http://wiki.apache.org/solr/>including some client libraries to easy
>>>> integrate your application with Solr:
>>>> http://wiki.apache.org/solr/IntegratingSolr
>>>> 
>>>> <http://wiki.apache.org/solr/IntegratingSolr>for fast prototyping you
>>> could
>>>> use Velocity:
>>>> http://wiki.apache.org/solr/VelocityResponseWriter
>>>> 
>>>> <http://wiki.apache.org/solr/VelocityResponseWriter>Anyway, I recommend
>>> you
>>>> to start with Solr's tutorial:
>>>> http://lucene.apache.org/solr/tutorial.html
>>>> 
>>>> 
>>>> Good luck,
>>>> <http://lucene.apache.org/solr/tutorial.html>Tomás
>>>> 
>>>> 2011/1/31 JOHN JAIRO GÓMEZ LAVERDE <jj...@hotmail.com>
>>>> 
>>>>> 
>>>>> 
>>>>> SOLR LUCENE
>>>>> DEVELOPERS
>>>>> 
>>>>> Hi i am new to solr and i like to make a custom search page for
>>> enterprise
>>>>> users
>>>>> in JSP that takes the results of Apache Solr.
>>>>> 
>>>>> - Where i can find some useful examples for that topic ?
>>>>> - Is JSP the correct approach to solve mi requirement ?
>>>>> - If not what is the best solution to build a customize search page for
>>> my
>>>>> users?
>>>>> 
>>>>> Thanks
>>>>> from South America
>>>>> 
>>>>> JOHN JAIRO GOMEZ LAVERDE
>>>>> Bogotá - Colombia
>>>>> 
>>> 
>>> 
> 


Re: CUSTOM JSP FOR APACHE SOLR

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

as suggested below, I tried to implement a custom ResponseWriter that would evaluate a JSP but that seems impossible: the HttpServletRequest and the HttpServletResponse are not available anymore.

Have I missed something?
Should I rather do a RequestHandler?
Does anyone know an artificial way to run a JSP? (I rather not like it).

thanks in advance

paul


Le 2 févr. 2011 à 20:42, Tomás Fernández Löbbe a écrit :

> Hi Paul, I don't fully understand what you want to do. The way, I think,
> SolrJ is intended to be used is from a client application (outside Solr). If
> what you want is something like what's done with Velocity I think you could
> implement a response writer that renders the JSP and send it on the
> response.
> 
> Tomás
> 
> 
> On Mon, Jan 31, 2011 at 6:25 PM, Paul Libbrecht <pa...@hoplahup.net> wrote:
> 
>> Tomas,
>> 
>> I also know velocity can be used and works well.
>> I would be interested to a simpler way to have the objects of SOLR
>> available in a jsp than write a custom jsp processor as a request handler;
>> indeed, this seems to be the way solrj is expected to be used in the wiki
>> page.
>> 
>> Actually I migrated to velocity (which I like less than jsp) just because I
>> did not find a response to this question.
>> 
>> paul
>> 
>> 
>> Le 31 janv. 2011 à 21:53, Tomás Fernández Löbbe a écrit :
>> 
>>> Hi John, you can use whatever you want for building your application,
>> using
>>> Solr on the backend (JSP included). You should find all the information
>> you
>>> need on Solr's wiki page:
>>> http://wiki.apache.org/solr/
>>> 
>>> <http://wiki.apache.org/solr/>including some client libraries to easy
>>> integrate your application with Solr:
>>> http://wiki.apache.org/solr/IntegratingSolr
>>> 
>>> <http://wiki.apache.org/solr/IntegratingSolr>for fast prototyping you
>> could
>>> use Velocity:
>>> http://wiki.apache.org/solr/VelocityResponseWriter
>>> 
>>> <http://wiki.apache.org/solr/VelocityResponseWriter>Anyway, I recommend
>> you
>>> to start with Solr's tutorial:
>>> http://lucene.apache.org/solr/tutorial.html
>>> 
>>> 
>>> Good luck,
>>> <http://lucene.apache.org/solr/tutorial.html>Tomás
>>> 
>>> 2011/1/31 JOHN JAIRO GÓMEZ LAVERDE <jj...@hotmail.com>
>>> 
>>>> 
>>>> 
>>>> SOLR LUCENE
>>>> DEVELOPERS
>>>> 
>>>> Hi i am new to solr and i like to make a custom search page for
>> enterprise
>>>> users
>>>> in JSP that takes the results of Apache Solr.
>>>> 
>>>> - Where i can find some useful examples for that topic ?
>>>> - Is JSP the correct approach to solve mi requirement ?
>>>> - If not what is the best solution to build a customize search page for
>> my
>>>> users?
>>>> 
>>>> Thanks
>>>> from South America
>>>> 
>>>> JOHN JAIRO GOMEZ LAVERDE
>>>> Bogotá - Colombia
>>>> 
>> 
>> 


Re: CUSTOM JSP FOR APACHE SOLR

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
Hi Paul, I don't fully understand what you want to do. The way, I think,
SolrJ is intended to be used is from a client application (outside Solr). If
what you want is something like what's done with Velocity I think you could
implement a response writer that renders the JSP and send it on the
response.

Tomás


On Mon, Jan 31, 2011 at 6:25 PM, Paul Libbrecht <pa...@hoplahup.net> wrote:

> Tomas,
>
> I also know velocity can be used and works well.
> I would be interested to a simpler way to have the objects of SOLR
> available in a jsp than write a custom jsp processor as a request handler;
> indeed, this seems to be the way solrj is expected to be used in the wiki
> page.
>
> Actually I migrated to velocity (which I like less than jsp) just because I
> did not find a response to this question.
>
> paul
>
>
> Le 31 janv. 2011 à 21:53, Tomás Fernández Löbbe a écrit :
>
> > Hi John, you can use whatever you want for building your application,
> using
> > Solr on the backend (JSP included). You should find all the information
> you
> > need on Solr's wiki page:
> > http://wiki.apache.org/solr/
> >
> > <http://wiki.apache.org/solr/>including some client libraries to easy
> > integrate your application with Solr:
> > http://wiki.apache.org/solr/IntegratingSolr
> >
> > <http://wiki.apache.org/solr/IntegratingSolr>for fast prototyping you
> could
> > use Velocity:
> > http://wiki.apache.org/solr/VelocityResponseWriter
> >
> > <http://wiki.apache.org/solr/VelocityResponseWriter>Anyway, I recommend
> you
> > to start with Solr's tutorial:
> > http://lucene.apache.org/solr/tutorial.html
> >
> >
> > Good luck,
> > <http://lucene.apache.org/solr/tutorial.html>Tomás
> >
> > 2011/1/31 JOHN JAIRO GÓMEZ LAVERDE <jj...@hotmail.com>
> >
> >>
> >>
> >> SOLR LUCENE
> >> DEVELOPERS
> >>
> >> Hi i am new to solr and i like to make a custom search page for
> enterprise
> >> users
> >> in JSP that takes the results of Apache Solr.
> >>
> >> - Where i can find some useful examples for that topic ?
> >> - Is JSP the correct approach to solve mi requirement ?
> >> - If not what is the best solution to build a customize search page for
> my
> >> users?
> >>
> >> Thanks
> >> from South America
> >>
> >> JOHN JAIRO GOMEZ LAVERDE
> >> Bogotá - Colombia
> >>
>
>

Re: CUSTOM JSP FOR APACHE SOLR

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

I also know velocity can be used and works well.
I would be interested to a simpler way to have the objects of SOLR available in a jsp than write a custom jsp processor as a request handler; indeed, this seems to be the way solrj is expected to be used in the wiki page.

Actually I migrated to velocity (which I like less than jsp) just because I did not find a response to this question.

paul


Le 31 janv. 2011 à 21:53, Tomás Fernández Löbbe a écrit :

> Hi John, you can use whatever you want for building your application, using
> Solr on the backend (JSP included). You should find all the information you
> need on Solr's wiki page:
> http://wiki.apache.org/solr/
> 
> <http://wiki.apache.org/solr/>including some client libraries to easy
> integrate your application with Solr:
> http://wiki.apache.org/solr/IntegratingSolr
> 
> <http://wiki.apache.org/solr/IntegratingSolr>for fast prototyping you could
> use Velocity:
> http://wiki.apache.org/solr/VelocityResponseWriter
> 
> <http://wiki.apache.org/solr/VelocityResponseWriter>Anyway, I recommend you
> to start with Solr's tutorial:
> http://lucene.apache.org/solr/tutorial.html
> 
> 
> Good luck,
> <http://lucene.apache.org/solr/tutorial.html>Tomás
> 
> 2011/1/31 JOHN JAIRO GÓMEZ LAVERDE <jj...@hotmail.com>
> 
>> 
>> 
>> SOLR LUCENE
>> DEVELOPERS
>> 
>> Hi i am new to solr and i like to make a custom search page for enterprise
>> users
>> in JSP that takes the results of Apache Solr.
>> 
>> - Where i can find some useful examples for that topic ?
>> - Is JSP the correct approach to solve mi requirement ?
>> - If not what is the best solution to build a customize search page for my
>> users?
>> 
>> Thanks
>> from South America
>> 
>> JOHN JAIRO GOMEZ LAVERDE
>> Bogotá - Colombia
>> 


Re: CUSTOM JSP FOR APACHE SOLR

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
Hi John, you can use whatever you want for building your application, using
Solr on the backend (JSP included). You should find all the information you
need on Solr's wiki page:
http://wiki.apache.org/solr/

<http://wiki.apache.org/solr/>including some client libraries to easy
integrate your application with Solr:
http://wiki.apache.org/solr/IntegratingSolr

<http://wiki.apache.org/solr/IntegratingSolr>for fast prototyping you could
use Velocity:
http://wiki.apache.org/solr/VelocityResponseWriter

<http://wiki.apache.org/solr/VelocityResponseWriter>Anyway, I recommend you
to start with Solr's tutorial:
http://lucene.apache.org/solr/tutorial.html


Good luck,
<http://lucene.apache.org/solr/tutorial.html>Tomás

2011/1/31 JOHN JAIRO GÓMEZ LAVERDE <jj...@hotmail.com>

>
>
> SOLR LUCENE
> DEVELOPERS
>
> Hi i am new to solr and i like to make a custom search page for enterprise
> users
> in JSP that takes the results of Apache Solr.
>
> - Where i can find some useful examples for that topic ?
> - Is JSP the correct approach to solve mi requirement ?
> - If not what is the best solution to build a customize search page for my
> users?
>
> Thanks
> from South America
>
> JOHN JAIRO GOMEZ LAVERDE
> Bogotá - Colombia
>