[Dovecot] 2.1: problems compiling fts-lucene - CLucene git version necessary?
Hello!
I have problems recompiling the Debian squeeze auto build packages with "--with-lecene". Is the git (2.3) version of CLucene necessary? Debian includes 0.9.21b, which does not work.
Lutz
On 11.9.2011, at 22.22, Lutz Preßler wrote:
I have problems recompiling the Debian squeeze auto build packages with "--with-lecene". Is the git (2.3) version of CLucene necessary?
Yes.
Debian includes 0.9.21b, which does not work.
Right, it doesn't.
Hello, On So, 11 Sep 2011, Timo Sirainen wrote:
On 11.9.2011, at 22.22, Lutz Preßler wrote:
I have problems recompiling the Debian squeeze auto build packages with "--with-lecene". Is the git (2.3) version of CLucene necessary? Yes. Ok, I now tried to test with clucene-core-2.3.3.4. Quite unsucessfully... I built libclucene-core-static.a and libclucene-shared-static.a after changing the cmake option (BUILD_STATIC_LIBRARIES). But despite enabling BUILD_CONTRIBS, BUILD_CONTRIBS_LIB no snowball/libstemmer has been build. (I am quite unfamiliar with the cmake process. Timo, maybe you can document how you build clucene - if you do it youself.) Anyway, I then changed the Debian auto package source to configure --with-lucene (but not --with-stemmer), and added/changed include paths and the static library to get lib21_fts_lucene_plugin.so (and doveadm/lib20_doveadm_fts_lucene_plugin.so). Adding "fts and fts_lucene" to mail_plugins and "fts = lucene" in plugin section this loads fine. But: trying to use it with SEARCH yields dovecot: imap(...): Error: fts_lucene: default_language set, but Dovecot built without stemmer support (and 3 times Error: fts: Failed to initialize backend 'lucene': Invalid fts_lucene setting) In fts_lucene_plugin_init_settings (src/plugins/fts-lucene/fts-lucene-plugin.c) default_language is initally set to 'english', and I don't find a way to get it unset. Adding to plugin section fts_lucene = default_language= or fts_lucene = default_language="" does not work. Bug? I changed the source (set variable to NULL before interpreting the settings) to fix this.
Now it's crashing though when trying a SEARCH. In crc32_str_more (crc=0, str=0x0) at crc32.c:87 87 for (; *p != '\0'; p++) (dovecot src/lib/crc32.c, not clucene). I'll send the full back trace seperately.
Lutz
On Sun, 2011-09-18 at 13:27 +0200, Lutz Preßler wrote:
Hello, On So, 11 Sep 2011, Timo Sirainen wrote:
On 11.9.2011, at 22.22, Lutz Preßler wrote:
I have problems recompiling the Debian squeeze auto build packages with "--with-lecene". Is the git (2.3) version of CLucene necessary? Yes. Ok, I now tried to test with clucene-core-2.3.3.4. Quite unsucessfully... I built libclucene-core-static.a and libclucene-shared-static.a after changing the cmake option (BUILD_STATIC_LIBRARIES). But despite enabling BUILD_CONTRIBS, BUILD_CONTRIBS_LIB no snowball/libstemmer has been build.
You need to install libstemmer separately. I think I used http://snowball.tartarus.org/dist/libstemmer_c.tgz
dovecot: imap(...): Error: fts_lucene: default_language set, but Dovecot built without stemmer support
On Mo, 19 Sep 2011, Timo Sirainen wrote:
On Sun, 2011-09-18 at 13:27 +0200, Lutz Preßler wrote:
Hello, On So, 11 Sep 2011, Timo Sirainen wrote:
On 11.9.2011, at 22.22, Lutz Preßler wrote:
I have problems recompiling the Debian squeeze auto build packages with "--with-lecene". Is the git (2.3) version of CLucene necessary? Yes. Ok, I now tried to test with clucene-core-2.3.3.4. Quite unsucessfully... I built libclucene-core-static.a and libclucene-shared-static.a after changing the cmake option (BUILD_STATIC_LIBRARIES). But despite enabling BUILD_CONTRIBS, BUILD_CONTRIBS_LIB no snowball/libstemmer has been build.
You need to install libstemmer separately. I think I used http://snowball.tartarus.org/dist/libstemmer_c.tgz Still having build problems --with-stemmer... libstemmer built and referenced seperately, libtextcat as Debian package, it's: lucene-wrapper.cc: In function 'lucene_index* lucene_index_init(const char*, mailbox_list*, const fts_lucene_settings*)': lucene-wrapper.cc:108: error: no matching function for call to 'lucene::analysis::snowball::SnowballAnalyzer::SnowballAnalyzer(const char*&)' ../../../../clucene-core-2.3.3.4/src/contribs-lib/CLucene/snowball/SnowballAnalyzer.h:32: note: candidates are: lucene::analysis::snowball::SnowballAnalyzer::SnowballAnalyzer(const TCHAR*, const TCHAR**) ../../../../clucene-core-2.3.3.4/src/contribs-lib/CLucene/snowball/SnowballAnalyzer.h:28: note: lucene::analysis::snowball::SnowballAnalyzer::SnowballAnalyzer(const TCHAR*) ../../../../clucene-core-2.3.3.4/src/contribs-lib/CLucene/snowball/SnowballAnalyzer.h:22: note: lucene::analysis::snowball::SnowballAnalyzer::SnowballAnalyzer(const lucene::analysis::snowball::SnowballAnalyzer&)
index->set.default_language is char, but TCHAR is wchar_t but not char?
dovecot: imap(...): Error: fts_lucene: default_language set, but Dovecot built without stemmer support
Without stemmer support it works nicely now though. One further question: Is fts indexing after delivery still on your TODO list?
Lutz
participants (2)
-
Lutz Preßler
-
Timo Sirainen