On Tue, 2007-01-09 at 22:50 -0500, Yonik Seeley wrote:
> Thanks Thorsten,
> 
> Knowing nothing about cocoon and little about forrest, I'm not sure
> exactly what this does :-)
> 

jeje, fair enough. 

You know forrest from the solr webpage. What I did is a small generic
way to access the solr server with cocoon/forrest. 

What it does is mainly solving (basic) SOLR-20 & SOLR-30 for cocoon. You
can update and select content from the solr server connecting to the
http interface. 

The nice thing is the power of cocoon that is Bertrand always talking
about. ;) We use the output of the solr server as is and use it in the
transformation pipeline. 

The update interface is 
http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.solr/images/gui-actionbar.png
and it returns a small success/error page (depending of the solr
response). This interface is half way url specific (add and delete) and
you can execute the commit and optimize commands on ever page.

It is based on the solr generator which is a wrapper of  
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/PostFile.java?view=markup

Which is a simple class to post a file from one url to another. The
response body is provide stream and as string. I wrote this simple class
since the patches of SOLR-20 & SOLR-30 are not yet applied. 

> I'll take a guess in non-cocoon/forrest speech: does it allow you to
> update a Solr server with the content of your website at the same time
> you generate (or change) the site?

Well, it is not working so for in the static build meaning
"forrest" (not sure ATM why myself) which would exactly do what you say
regarding generating the site. In "forrest run", the dynamic mode of
forrest, however it lets ...


>    So it's a push model of web
> indexing instead of spidering? 

Exactly. 

To finish above sentence ... you push update commands to the server
based on each selected page.

>  The search-box I understand, but
> presumably that needs to point to a running Solr server somewhere.

Yes.
http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.solr/index.html
"...
The host server urls can be configured by adding the following
properties to your project forrest.properties.xml in case you do not use
the default values.

<property name="solr.select.url" value="http://localhost:8983/solr/select"/>
<property name="solr.update.url" value="http://localhost:8983/solr/update"/> 
..."

The forrest.properties.xml is new in 0.8-dev.

The result will be transformed to something like:
http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.solr/images/result.png

I added a transformer that adds the paginator part to the solr select result. 
The paginator is the "Result pages" part of above screenshot. 

Hmm, that makes me think whether that (the paginator) would be better directly 
in solr core. 


wdyt?

salu2
> 
> -Yonik
> 
> On 1/7/07, Thorsten Scherler <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I am happy to announce that I just add a Apache Forrest based Apache
> > Solr client plugin to the forrest whiteboard. It may be from interest
> > for the ones using Apache Cocoon based Apache Forrest and Apache Lucene
> > based Apache Solr.
> >
> > org.apache.forrest.plugin.output.solr generates Apache Solr documents
> > from Apache Forrest xdos. Further when run with the Apache Forrest
> > Dispatcher it provides a GUI to manage your project in solr and a search
> > interface to search your solr server.
> >
> > The documentation and a couple of screenshots can be found at
> > http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.solr/
> >
> > The source code can be found at
> > http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/
> >
> > Have fun with it and please provide feedback to this list.
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Reply via email to