我正在尝试按照此操作通过我的 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的界面,没有文章:
使用FTS 索引,然后您将在您的 fts 后端看到结果。
通过命令同步提交给 FTS 引擎的全文内容的内部状态
doveadm fts reindex
本身并不一定要做很多事情。在solr绑定的情况下,它只是将光标移回零。仅当某些内容(发出搜索、发布新邮件、手动)在该命令后
doveadm index
触发更新索引时,即发送数据时(在您的情况下,发送到solr)。