cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaj Kandler <KajKand...@Conficio.com>
Subject Re: searching with Lucene in bilingual Cocoon site
Date Tue, 27 Jun 2006 13:23:01 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Stephen,
I'm totally guessing here as I have limited experience with cocoon and
lucene.

I found I have more control over where the indices are, when I define
"work-directory" in my web.xml (just uncomment.) It seems to me you are
using the default and that is in tmp, where I'm sure you don't want the
indeces to be. If you uncomment, The indeces will be in
WEB-INF/work/searc-[de|en] (if you defien them so at generation time)
and you can see and control them better.

Good luck

K<o>


Stephen Winnall wrote:
> I'm implementing a bilingual website using Cocoon 2.1.8. I want a search
> facility, so
> I'm trying to use the Lucene block to implement it. Since the two
> languages (English
> and German) have different stop lists, stemming rules etc., and any
> given word may
> have a different meaning depending on the language, it seems to me
> appropriate
> to have two separate indices.
> 
> The following extracts from my sitemap show how I have tried to solve this:
> 
> <map:components>
> 
>     ....
> 
>     <map:generators>
> 
>         ....
> 
>         <map:generator name="search-de"
> src="org.apache.cocoon.generation.SearchGenerator">
>             <index>search/de</index>
>             <analyzer>org.apache.lucene.analysis.de.GermanAnalyzer
> </analyzer>
>         </map:generator>
> 
>         <map:generator name="search-en"
> src="org.apache.cocoon.generation.SearchGenerator">
>             <index>search/en</index>
>            
> <analyzer>org.apache.lucene.analysis.standard.StandardAnalyzer</analyzer>
>         </map:generator>
> 
>         ....
> 
>     </map:generators>
> 
>     ....
> 
> </map:components>
> 
> <map:pipelines>
> 
>     ....
> 
>     <map:pipeline>
> 
>         ....
> 
>         <map:match pattern="search">
>             <map:act type="locale">
>                 <map:select type="parameter">
>                     <map:parameter name="parameter-selector-test"
> value="{language}" />
>                     <map:when test="de">
>                         <map:generate type="search-de" />
>                     </map:when>
>                     <map:otherwise>
>                         <map:generate type="search-en" />
>                     </map:otherwise>
>                 </map:select>
>             </map:act>
>             <map:serialize type="xml" />
>         </map:match>
> 
>         ....
> 
>     </map:pipeline>
> 
>     ....
> 
> </map:pipelines>
> 
> 
> However, when I invoke the URI /search I get the following error from
> Jetty:
> 
>     java.io.IOException: /private/tmp/Jetty__8888__/cocoon-files/index
> not a directory
> 
> Apparently Cocoon is ignoring the <index> entry in the <map:generator>
> element, where
> I specified "search/de" for German and "search/en" for English and using
> the default
> "index".
> 
> Can anyone give me pointers on how to deal with this problem? Do I have
> to take a
> spanner to org.apache.cocoon.generation.SearchGenerator in the Lucene
> block and
> change something?
> 
> Steve
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

- --
KajKandler@Conficio.com
 http://conficio.blogspot.com/
 ================================================
 |  We teach software one screencast at a time  |
 ================================================
 http://www.conficio.com/
 Tel: +1 (781) 632 5773 - Fax: +1 (781) 207 9159
 Conficio
 P.O.Box 761062,  Melrose,
 MA 02176

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)

iD8DBQFEoTE1RDUvrJRNjTARAvvZAKCO7sVdI95dT+tscyCV3pDkADtWtQCdH0ev
5FeEKRstCEiVtqOveEHSlDI=
=FfVU
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message