nextcloud16 es7.3 全文检索

nextcloud16 es7.3 全文检索

nextcloud 安装3个app 插件

Full text search
Full text search - Elasticsearch Platform
Full text search - Files

设置插件

设置->全文检索->Servelet地址:http://localhost:9200/
设置->全文检索->[高级] 分析器tokenizer: ik_smart

安装ES插件

# ingest-attachment
/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment

#安装IK分词
/usr/share/elasticsearch/bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.3.0/elasticsearch-analysis-ik-7.3.0.zip

初始化索引

cd /var/www
sudo -u nginx ./occ fulltextsearch:index

创建并启动服务

由于全文索引需要不停的进行(因为有新的文件进来),做成centos服务

vi /etc/systemd/system/nextcloud-fulltext-elasticsearch-worker.service
修改目录 user group 内容 

[Unit]
Description=Elasticsearch Worker for Nextcloud Fulltext Search
After=network.target

[Service]
User=nginx
Group=nginx
WorkingDirectory=/var/www
ExecStart=/usr/bin/php /var/www/occ fulltextsearch:live -q
ExecStop=/usr/bin/php /var/www/occ fulltextsearch:stop
Nice=19
Restart=always

[Install]
WantedBy=multi-user.target
#开机启动
systemctl enable nextcloud-fulltext-elasticsearch-worker
systemctl start nextcloud-fulltext-elasticsearch-worker

问题

pipeline with id [attachment] does not exist

│ Error:      2/2
│ Index: files:478
│ Exception: Elasticsearch\Common\Exceptions\BadRequest400Exception
│ Message: pipeline with id [attachment] does not exist

重建索引
cd /var/www
sudo -u nginx ./occ fulltextsearch:reset
sudo -u nginx ./occ fulltextsearch:index

Search platform (Elasticsearch) down ?

启动ES systemctl start elasticsearch ,当然你需要稍微等一下他启动

In IndexService.php line 253: please add ingest-attachment plugin to elasticsearch

In IndexService.php line 253:
  please add ingest-attachment plugin to elasticsearch 

安装插件
/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment

The current PHP memory limit is below the recommended value of 512MB

编辑php.ini
memory_limit = 512M

php The posix extensions are required

yum install php-process -y

参考

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值