Dovecot 的 fts_solr - 找不到插件文件?

Dovecot 的 fts_solr - 找不到插件文件?

我正在尝试按照以下步骤在 Dovecot 安装中设置 Solr 搜索:

https://doc.dovecot.org/configuration_manual/fts/solr/#fts-backend-solr

一切似乎都运行良好 - 我可以在 Solr 管理中看到核心。我正在使用 Solr 8.9.0,但它似乎对配置文件很满意。

但是,它要求运行的一个命令实际上就是索引:

doveadm fts rescan -u [email protected] 

我得到:

Fatal: Plugin 'fts_solr' not found from directory /usr/lib/dovecot/modules

果然,我没有在任何以这个名字命名的东西中看到任何东西:

root@east:/usr/lib/dovecot/modules# ls -lh *fts*
-rw-r--r-- 1 root root 263K Jul  7 17:17 lib20_fts_plugin.so
-rw-r--r-- 1 root root  71K Jul  7 17:17 lib21_fts_squat_plugin.so

我遗漏了什么?我是否也需要手动安装插件?

dovecot --version
2.3.7.2 (3c910f64b)

更新:环顾四周,我可以看到 dovecot-fts-solr 插件(https://alpine.pkgs.org/3.15/alpine-main-aarch64/dovecot-fts-solr-2.3.17.1-r0.apk.html)。我似乎无法安装它。不太清楚该怎么做?(我可以下载 .so 文件并将其放入 /usr/lib/dovecot/modules ,但我很确定这行不通 :))

更新2:因此我设法找到了:

apt-get 安装 dovecot-solr

这将创建 lib21_fts_solr_plugin.so 文件。但是,当我尝试重新索引消息时,我没有得到任何结果:

doveadm -D fts rescan -u [email protected]
Debug: Loading modules from directory: /usr/lib/dovecot/modules
Debug: Module loaded: /usr/lib/dovecot/modules/lib20_fts_plugin.so
Debug: Module loaded: /usr/lib/dovecot/modules/lib21_fts_solr_plugin.so
Debug: Loading modules from directory: /usr/lib/dovecot/modules/doveadm
Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so: undefined symbol: acl_user_module (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: expire_set_deinit (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so: undefined symbol: quota_user_module (this is usually intentional, so just ignore this message)
Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_sieve_plugin.so
Debug: Skipping module doveadm_fts_lucene_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_lucene_plugin.so: undefined symbol: lucene_index_iter_deinit (this is usually intentional, so just ignore this message)
Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so
Debug: Skipping module doveadm_mail_crypt_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/libdoveadm_mail_crypt_plugin.so: undefined symbol: mail_crypt_box_get_pvt_digests (this is usually intentional, so just ignore this message)
doveadm([email protected])<35131><>: Debug: auth-master: userdb lookup([email protected]): Started userdb lookup
doveadm([email protected])<35131><>: Debug: auth-master: conn unix:/var/run/dovecot//auth-userdb: Connecting
doveadm([email protected])<35131><>: Debug: auth-master: conn unix:/var/run/dovecot//auth-userdb: Client connected (fd=10)
doveadm([email protected])<35131><>: Debug: auth-master: userdb lookup([email protected]): auth USER input: [email protected] uid=1011 gid=8 home=/home/hatlamp quota_rule=*:storage=0M
doveadm([email protected])<35131><>: Debug: auth-master: userdb lookup([email protected]): Finished userdb lookup ([email protected] uid=1011 gid=8 home=/home/hatlamp quota_rule=*:storage=0M)
doveadm([email protected])<35131><>: Debug: Added userdb setting: plugin/quota_rule=*:storage=0M
doveadm([email protected]): Debug: Effective uid=1011, gid=8, home=/home/hatlamp
doveadm([email protected]): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/home/hatlamp/mail/hatlamp.com/hello
doveadm([email protected]): Debug: maildir++: root=/home/hatlamp/mail/hatlamp.com/hello, index=, indexpvt=, control=, inbox=/home/hatlamp/mail/hatlamp.com/hello, alt=
doveadm([email protected]): Debug: auth-master: conn unix:/var/run/dovecot//auth-userdb: Disconnected: Connection closed (fd=10)

查看Solr的界面,没有文章:

在此处输入图片描述

答案1

使用FTS 索引,然后您将在 fts 后端看到结果。

通过命令同步提交给 FTS 引擎的全文内容的内部状态doveadm fts reindex本身并不一定能起到很大作用。在solr具有约束力,它只需移动光标回到零。

这将从索引中删除已删除的邮件,并确保下一个 doveadm 索引将索引所有丢失的邮件(如果有)。请注意,目前大多数 FTS 后端没有正确实现这一点,而是删除了所有 FTS 索引。这可能会在未来版本中发生变化。——来自人鸽adm-fts,重点是我的

只有当某些事情(发起搜索、发布新邮件、手动doveadm index)触发更新索引时该命令,即发送数据时(在你的情况下,发送到solr)。

相关内容