Hi Kaj

Thanks.

That's the answer to the next question! As you say, the index directory is created under the work-directory, which is odd, to say the least because - as I understand and observe it - everything under the work-directory gets wiped out on a restart of Jetty. But having the stuff under WEB-INF/work does make more sense than
under /tmp. I've changed to that, but the problem persists.

My problem is simply that I can create 2 indices (one for English and one for
German) under the work-directory using the index transformer
(org.apache.cocoon.transformation.LuceneIndexTransformer) but I can't access them using org.apache.cocoon.generation.SearchGenerator because it always
looks for something called "index"...

Steve

On 27 Jun 2006, at 15:23, Kaj Kandler wrote:

-----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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


- --
[EMAIL PROTECTED]
 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to