elasticsearchのインストール
公式アドレス:https:
//www.elastic.co/cn/downloads/elasticsearch elasticsearch7 Windowsは機械学習をサポートしていないため、elasticsearch.ymlに構成を追加する必要があります
node.name: node-1
cluster.initial_master_nodes: ["node-1"]
xpack.ml.enabled: false
http.cors.enabled: true
http.cors.allow-origin: /.*/
訪問の開始:http:// localhost:9200
クラスター情報の表示:http:// localhost:9200 / _cluster / health
kibana安装
公式アドレス:https:
//www.elastic.co/cn/downloads/kibana解凍後、kibana.ymlを変更し、
ダブルクリックして開始します。
アクセス:http:// localhost:5601
nodejsをインストールします
公式ウェブサイトアドレス:https://nodejs.org/en/download/
ダブルクリックして
ビューバージョンを実行します
node -v
gruntをインストールする
npm install -g grunt-cli
バージョンを表示
grunt -version
ヘッドプラグインをダウンロードする
ダウンロード:https://github.com/mobz/elasticsearch-head
をelasticsearch-head-masterディレクトリにダウンロードします
npm install
npm run start
IKトークナイザーのダウンロード
ダウンロードアドレス:https://github.com/medcl/elasticsearch-analysis-ik/releases
対応するバージョンのIKをダウンロード
し、elasticsearchのpluginsディレクトリにikディレクトリを作成し、解凍されたファイル内のすべてのファイルをikに配置しますelasticsearchとkibana
を再起動して、
ikのik_smartおよびik_max_wordトークナイザーを表示します
get _analyze
{
"analyzer":"ik_smart",
"text":"刘福成是一名java工程师"
}
get _analyze
{
"analyzer":"ik_max_word",
"text":"刘福成是一名java工程师"
}
カスタムワードセグメンテーション
ikのconfigディレクトリにカスタムファイルliufucheng.dicを追加し、ファイルにカスタムワードセグメンテーションを追加し
てコードを変更します
定義したファイルを構成ファイルに追加します
elasticsearchとkibanaを再起動します