Re: http://wiki.apache.org/solr/SolrForrest

2008-02-14 Thread Thorsten Scherler
On Wed, 2008-02-13 at 16:52 -0500, Charlie Rose wrote:
> > I guess you are using forrest 0.8, right? 
> 
> 
> forrest 0.9

svn trunk, ok.

> 
> 
> > Do you use the plugin with the dispatcher or with skins?
> > 
> > 
> 
> 
> I am pretty new to Forrest. I've gone through documentation relating
> to this but don't have a handle on it yet.

if you do:
cd whiteboard/plugins/org.apache.forrest.plugin.output.solr
forrest run

You will see the dispatcher contracts in action at
http://localhost:/index.html



>  I've built the plugin, added it to required plugins, copied the jar
> to the web app, and I know I am successfully calling through to my
> solr server. 

You normally just do 
cd MY_PROJECT
forrest war

This will generate all needed files and add it to a war.

> i would like to add the forrest:contracts and have the buttons in the
> action bar, but documentation doesn't adequately specify which files
> those need to be added to and my knowledge doesn't cover the gaps yet.
> I find-grepped forrest:contract and only found a few examples deep
> within skins that don't even appear to be active (leather-dev where
> the active skin is pelt).

No, if you want to use the dispatcher then you cannot use skins (is
either or). The leather-dev is not working, it was the intend to
incorporate the dispatcher in skin, but this did not work. 
DO NOT USE leather-dev.

If you did the above (forrest run on the plugin) you can see how the
dispatcher is working.

The style is controlled by
whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/documentation/resources/structurer/url/pelt.fv
which imports
whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/panels/solrbar.panel.xml
There we use the solr contracts which you can find in
whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html
The search contract is solr-search.ft.

More information about the dispatcher can be found 
http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.internal.dispatcher/

> 
> 
> > In any way requesting
> > http://localhost:8080/YOUR_PROJECT/solr-search.html?version=2.2&hl=true&hl.fl=content&fl=id,title&indent=on&rows=10&start=0&q=test
> 
> 
> This returns the correct search results.
> 

So it is working, nice.

> 
> > If you do not run solr on default port you need to change
> >  > value="http://localhost:8983/solr/select"/>
> > in your forrest.properties.xml
> 
> 
> Yes, I've changed this to http://localhost:8084/solr/select
> 
> 
> I create a link to the solr-search page in Forrest but I don't see a
> way to get a field containing the query and pass it to the search
> operation. 

Do not understand. The link would need to be a GET submit to the
search.html in the form solr-search.html?q=test or using a form.

> The link works and dispatches the way I want. It just doesn't provide
> any search terms. When I provide them myself by
> appending ?q=some-terms to the url it returns the results I am looking
> for.

See the solr-search.ft there is a form.

> 
> 
> There are a number of cocoon forms examples that pass query parameters
> from a form entry field but forms are disallowed by the DTD in
> Forrest. I could try to override or extend the Forrest google/lucene
> search panel but I don't want a web site search widget, I want a
> search page in the website that searches an entirely different site.

The dispatcher allows you to define page specific styles and you a free 
to add whatever content. It is very easy to use once you understood the
concept.

However the easiest way to do it in skin is to create a HTML page and
use this for the search form. 

P.S. Please subscribe to the list since I need to moderate your messages
through.

salu2

> 
> Charles Rose
> CogNet
> MIT Press Journals
> 
> 
> 
> 
> 
> 
> 
> On Feb 13, 2008, at 3:15 PM, Thorsten Scherler wrote:
> 
> > On Wed, 2008-02-13 at 11:36 -0500, Charlie Rose wrote:
> > > I have Forrest and this plugin working in a Tomcat environment.
> > > However, I cannot figure out how to pass the query string, and my
> > > results aren't transformed. If you have any ideas, please let me
> > > know.
> > 
> > 
> > I guess you are using forrest 0.8, right? 
> > 
> > 
> > Do you use the plugin with the dispatcher or with skins?
> > 
> > 
> > In any way requesting
> > http://localhost:8080/YOUR_PROJECT/solr-search.html?version=2.2&hl=true&hl.fl=content&fl=id,title&indent=on&rows=10&start=0&q=test
> > 
> > 
> > should return something. We use more or less the same parameter as
> > in
> > solr directly (q is the query parameter).
> > 
> > 
> > As mentioned in
> > http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.solr/
> > 
> > 
> > If you do not run solr on default port you need to change
> >  > value="http://localhost:8983/solr/select"/>
> > in your forrest.properties.xml
> > 
> > 
> > HTH
> > 
> > 
> > salu2
> > > 
> > > 
> > > 
> > > 
> > > Thanks.
> > > 
> > > 
> > > Charles Rose
> > > 

Re: http://wiki.apache.org/solr/SolrForrest

2008-02-13 Thread Charlie Rose

I guess you are using forrest 0.8, right?


forrest 0.9


Do you use the plugin with the dispatcher or with skins?



I am pretty new to Forrest. I've gone through documentation relating  
to this but don't have a handle on it yet. I've built the plugin,  
added it to required plugins, copied the jar to the web app, and I  
know I am successfully calling through to my solr server. i would  
like to add the forrest:contracts and have the buttons in the action  
bar, but documentation doesn't adequately specify which files those  
need to be added to and my knowledge doesn't cover the gaps yet. I  
find-grepped forrest:contract and only found a few examples deep  
within skins that don't even appear to be active (leather-dev where  
the active skin is pelt).



In any way requesting
http://localhost:8080/YOUR_PROJECT/solr-search.html? 
version=2.2&hl=true&hl.fl=content&fl=id,title&indent=on&rows=10&start= 
0&q=test


This returns the correct search results.


If you do not run solr on default port you need to change
http://localhost:8983/solr/select"/>
in your forrest.properties.xml


Yes, I've changed this to http://localhost:8084/solr/select

I create a link to the solr-search page in Forrest but I don't see a  
way to get a field containing the query and pass it to the search  
operation.
The link works and dispatches the way I want. It just doesn't provide  
any search terms. When I provide them myself by appending ?q=some- 
terms to the url it returns the results I am looking for.


There are a number of cocoon forms examples that pass query  
parameters from a form entry field but forms are disallowed by the  
DTD in Forrest. I could try to override or extend the Forrest google/ 
lucene search panel but I don't want a web site search widget, I want  
a search page in the website that searches an entirely different site.


Charles Rose
CogNet
MIT Press Journals




On Feb 13, 2008, at 3:15 PM, Thorsten Scherler wrote:


On Wed, 2008-02-13 at 11:36 -0500, Charlie Rose wrote:

I have Forrest and this plugin working in a Tomcat environment.
However, I cannot figure out how to pass the query string, and my
results aren't transformed. If you have any ideas, please let me  
know.


I guess you are using forrest 0.8, right?

Do you use the plugin with the dispatcher or with skins?

In any way requesting
http://localhost:8080/YOUR_PROJECT/solr-search.html? 
version=2.2&hl=true&hl.fl=content&fl=id,title&indent=on&rows=10&start= 
0&q=test


should return something. We use more or less the same parameter as in
solr directly (q is the query parameter).

As mentioned in
http://forrest.apache.org/pluginDocs/plugins_0_80/ 
org.apache.forrest.plugin.output.solr/


If you do not run solr on default port you need to change
http://localhost:8983/solr/select"/>
in your forrest.properties.xml

HTH

salu2



Thanks.

Charles Rose
CogNet
MIT Press Journals









--
Thorsten Scherler  
thorsten.at.apache.org
Open Source Java  consulting, training and  
solutions






Re: http://wiki.apache.org/solr/SolrForrest

2008-02-13 Thread Thorsten Scherler
On Wed, 2008-02-13 at 11:36 -0500, Charlie Rose wrote:
> I have Forrest and this plugin working in a Tomcat environment.
> However, I cannot figure out how to pass the query string, and my
> results aren't transformed. If you have any ideas, please let me know.

I guess you are using forrest 0.8, right? 

Do you use the plugin with the dispatcher or with skins?

In any way requesting
http://localhost:8080/YOUR_PROJECT/solr-search.html?version=2.2&hl=true&hl.fl=content&fl=id,title&indent=on&rows=10&start=0&q=test

should return something. We use more or less the same parameter as in
solr directly (q is the query parameter).

As mentioned in
http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.solr/

If you do not run solr on default port you need to change
http://localhost:8983/solr/select"/>
in your forrest.properties.xml

HTH

salu2
> 
> 
> Thanks.
> 
> Charles Rose
> CogNet
> MIT Press Journals
> 
> 
> 
> 
> 
> 
> 
> 
-- 
Thorsten Scherler thorsten.at.apache.org
Open Source Java  consulting, training and solutions



Re: http://wiki.apache.org/solr/SolrForrest

2008-02-13 Thread Charlie Rose
I have Forrest and this plugin working in a Tomcat environment.  
However, I cannot figure out how to pass the query string, and my  
results aren't transformed. If you have any ideas, please let me know.


Thanks.

Charles Rose
CogNet
MIT Press Journals