在Crowi中添加搜索功能的方法

因为希望在Crowi上添加搜索功能,所以我们向预先搭建好的Crowi1.6版本中添加了该功能。

验证环境

    • CentOS 7.4 x64 (Minimal Install)

 

    Crowi 1.6.2

Crowi的设置方法请参照以下的文章:
https://qiita.com/SkyLaptor/items/f5de5f8528da277abd8f

安装所需的模块进行设置

# yum install java-1.8.0-openjdk
# rpm -qa | grep java-
java-1.8.0-openjdk-headless-1.8.0.144-0.b01.el7_4.x86_64
java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64

安装Elasticsearch。

# vi /etc/yum.repos.d/elasticsearch.repo
# yum install elasticsearch
# rpm -qa | grep elasticsearch
elasticsearch-5.6.1-1.noarch
# cd /usr/share/elasticsearch
# bin/elasticsearch-plugin install analysis-kuromoji
# systemctl start elasticsearch
# systemctl enable elasticsearch
[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

请参考以下链接:https://www.elastic.co/guide/en/elasticsearch/plugins/current/installation.html

Crowi的设置更改

# vi /etc/sysconfig/crowi
# systemctl restart crowi
# 追記
ELASTICSEARCH_URI="http://localhost:9200"

检查搜索功能是否正常运行

访问Crowi并确认搜索功能已添加。

2017-09-22_12h22_28.png

为什么在Internet Explorer上无法显示?在Chrome和Firefox上没有问题。

请看

以下是两个链接:

1. https://qiita.com/bezeklik/items/48fe054c2df05f03f3d1

2. https://qiita.com/oshuya/items/05883de5cc275d87a7b8

广告
将在 10 秒后关闭
bannerAds