Peter,
You shouldn't need the import statement in LuceneIndex.java.

All you need is the <analyzer> element child in the <module>.

But it looks like it is a separate jar.

http://www.docjar.com/docs2web/s.jsp?q=org.apache.lucene.analysis.snowball.SnowballAnalyzer&t=j&start=0

Try downloading the jar and put it in the lib directory and recompile.

-mike



From: Hungerburg <pch13@myzel.net>
To: Wolfgang Meier <wolfgangmm@gmail.com>
Cc: Mike Ferrando <mikeferrando@yahoo.com>; eXist Open <exist-open@lists.sourceforge.net>
Sent: Fri, July 30, 2010 2:41:24 PM
Subject: Re: [Exist-open] lucene snowball analyzer

Am 2010-07-30 17:13, schrieb Wolfgang Meier:
>> In the org.exist.indexing.lucene.LuceneIndex class you need to comment out
>> the Lucene StandardAnalyzer (as the default analyzer used) and put this one
>> in it.
>
> This should not be necessary. I'm not sure why you had to do that.
> However, in addition to collection.xconf, you can also configure the
> analyzer in the main conf.xml:
>
> <module id="lucene-index" class="org.exist.indexing.lucene.LuceneIndex"
>                  buffer="32">
> <analyzer class="..."/>
> </module>
>
> Peter, putting the module jar into
> EXIST-HOME/extensions/indexes/lucene/lib/ should indeed make it
> available on the classpath.
>
> Wolfgang

I think it is available on the classpath, there is no not-found-exception but a instantiation-exception. I added the import statement in LuceneIndex.java and recompiled. The message remains and no index will be created:

Caused by: java.lang.InstantiationException: org.apache.lucene.analysis.snowball.SnowballAnalyzer
    at java.lang.Class.newInstance0(Class.java:340)
    at java.lang.Class.newInstance(Class.java:308)
    at org.exist.indexing.lucene.AnalyzerConfig.configureAnalyzer(AnalyzerConfig.java:43)

I will give in. it was very easy to get pdf-images and hyphenation patterns into fop. this is a tougher one. I also tried to pass some more arguments to the analyzer in collection.xconf:

<analyzer id="snowball" class="org.apache.lucene.analysis.snowball.SnowballAnalyzer" stemmer="German" locale="de"/>

regards

-- peter