Hi,

I'm testing out 2.1.rc1, building against clucene 2.3.3.4.

Without libstemmber, the build fails because it attempts to include 
SnowballAnalyzer.h which is not part of "core" clucene.

Simple patch below to make dovecot 2.1.rc1 build with clucene but without 
libstemmer (or textcat).

Looking at libstemmer itself, there are multiple versions. The version in 
clucene is put into libclucene-contribs-lib.so, but that version is older than 
libstemmer_c, which generates libstemmer.a, tested for in the dovecot 2.1.rc1 
configure script. The dovecot code uses SnowballAnalyzer.h as a C++ wrapper 
around libstemmer.

What versions of libstemmer, clucene and libtextcat is dovecot 2.1.rc1 intended 
to be used against?

Is it worth bringing the wrapper class around libstemmer into dovecot to avoid 
funny dependencies against clucene and so that the -lstemmer test in configure 
is enough?

For reference, I'm building on FreeBSD 9.0-RC3, system gcc.

Regards,

Jan Mikkelsen.


diff -u -d -r dovecot-2.1.rc1/src/plugins/fts-lucene/lucene-wrapper.cc 
dovecot-2.1.rc1.patched/src/plugins/fts-lucene/lucene-wrapper.cc
--- dovecot-2.1.rc1/src/plugins/fts-lucene/lucene-wrapper.cc    2011-11-09 
08:45:26.000000000 +1100
+++ dovecot-2.1.rc1.patched/src/plugins/fts-lucene/lucene-wrapper.cc    
2011-12-14 23:36:54.319796535 +1100
@@ -23,7 +23,9 @@
#include <CLucene.h>
#include <CLucene/util/CLStreams.h>
#include <CLucene/search/MultiPhraseQuery.h>
+#if defined(HAVE_LUCENE_STEMMER) || defined(HAVE_LUCENE_TEXTCAT)
#include "SnowballAnalyzer.h"
+#endif

/* Lucene's default is 10000. Use it here also.. */
#define MAX_TERMS_PER_DOCUMENT 10000




Reply via email to