带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(4)

本文涉及的产品
检索分析服务 Elasticsearch 版,2核4GB开发者规格 1个月
简介: 带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(4)


《Elastic Stack 实战手册》——三、产品能力——3.5 进阶篇——3.5.18.Enterprise Search —— 3.5.18.1.Workplace Search(3) https://developer.aliyun.com/article/1226989



安装 Elastic Workplace Search 

你可以在地址 Workplace Search(https://www.elastic.co/cn/downloads/past-releases/enterprise-search-7-10-0)下载最新的软件。我们也可以使用如下的命令来进行安装:

wget https://artifacts.elastic.co/downloads/enterprise-search/enterprise-search-7.10.0.tar.gz

按照 Elastic Stack 的安装要求,我们需要安装和 Elasticsearch 版本一致的 Workplace

Search 软件。等我们把 Workplace 下载完后,我们使用如下的命令来进行安装:

tar xzf enterprise-search-7.10.0.tar.gz
cd enterprise-search-7.10.0

我们现在来配置 config/enterprise-search.yml 文件。用我们喜爱的编辑器打开该文件,并添加如下的内容:

elasticsearch.host: [ELASTICSEARCH_URL]
ent_search.auth.<auth_name>.source: standard
elasticsearch.username: elastic
elasticsearch.password: [ELASTIC_USER_PASSWORD]
allow_es_settings_modification: true

记得用我们上面步骤中的 elastic 用户密码来代替上面的 [ELASTIC_USER_PASSWORD]。同时我们也需要使用我们 elasticsearch 实际的地址来代替上的 [ELASTICSEARCH_URL],比如

http://127.0.0.1:9200。在默认的情况下,http://127.0.0.1:9200 就是默认值,我们不需要做任何的改动。

 

启动 Elastic Workplace Search

 

在上面我们已经成功地安装好 Elastic Stack 及 Workplace Search。接下来,我们开始启动 Workplace Search。在这里有两种方法来启动

1、在命令行中定义自己喜欢的密码:

 

ENT_SEARCH_DEFAULT_PASSWORD=passwordexample bin/enterprise-search

 

2、直接运行 enterprice search,并获得我我们需要的密码:

bin/enterprise-search

image.png


在我们第一次运行的过程中,我们可以看到如下的输出:

Invalid config file (/opt/soft/enterpriseSearch/enterprise-search-7.10.0/config/enterprise-search.yml):
The setting '#/secret_management/encryption_keys' is not valid
No secret management encryption keys were provided.
Your secrets cannot be stored unencrypted.
You can use the following generated encryption key in your config file to store new encrypted secrets:
secret_management.encryption_keys: [cce8eb0bbafcfc2734768fd7fa4ce975348cb7edad51513dcd843ff58537e633]


按照提示将 secret_management.encryption_keys 的值加入到 enterprise-search.yml 中并重启。


#########################################################
*** Default user credentials have been setup. These are only printed once, so please ensure they are recorded. ***
      username: enterprise_search
      password: 8h39qfaq6onppn3c
#########################################################

 我们可以看见 enterprice-search 会生成用户名及密码。就像上面说明的那样,我们需要记录下来这个用户名及密码,因为它只显示一次。一旦失去,再也没有机会获得了。我们也可以看到如下的一些信息:

#########################################################
Success! Elastic Enterprise Search is starting successfully.
In a few moments, you'll be able to login at the following address:
* URL: http://localhost:3002
  * If this is your first time starting Enterprise Search, check the console output above for your user authentication credentials.
  * Visit the documentation: https://www.elastic.co/guide/en/enterprise-search
Secret session key has been generated.
Set the key in your config file to persist user sessions through process restarts:
secret_session_key: 66e2d3361a64850b75244dc58103e690270f68a1fef0d95ec7db9072f3c126e08f9fc1bf78251ed1e6b854009d7594887ec85657a1fdf473b356e918a3d3079c
#########################################################

在上面我们可以看到 enterprise-search 运行于 3002 口地址上。同时我们可以看到上面的一个 key

 

secret_session_key: 66e2d3361a64850b75244dc58103e690270f68a1fef0d95ec7db9072f3c126e08f9fc1bf78251ed1e6b854009d7594887ec85657a1fdf473b356e918a3d3079c

我们需要把上面的 key 填入到 config/enterprise-search.yml 文件中以保证 enterprise-search 重启后的用户会话。

vi config/enterprise-search.yml

image.png


等我们修改完上面的配置后,我们重新来启动我们的 enterprise-search,我们可以看出来如下的输出:

 

#########################################################
Success! Elastic Enterprise Search is starting successfully.
In a few moments, you'll be able to login at the following address:
* URL: http://localhost:3002
  * If this is your first time starting Enterprise Search, check the console output above for your user authentication credentials.
   * Visit the documentation: https://www.elastic.co/guide/en/enterprise-search
#########################################################

上面显示我们的 Elastic Workplace Search 已经被成功地启动了,并运行于端口地址 3002。在起初开始运行的时候,我们可以看到如下的一些输出:

 

#Starting HTTP server
#[connectors][INFO]: Starting to process jobs
#Starting Filebeat

从上面的输出里我们可以看出来:它他启动了一个 application server 及一些 connectors 和一个 filebeat 的实例。

 

我们在浏览器的地址栏中,输入地址 localhost:3002,我们可以看到如下画面:

image.png


正如上面显示的那样,它显示了目前的运行状态完好。我们的 Elasticsearch 的试用版还有30天的试用期。我们点击“Continue to Login”

 

 

image.png

我们把之前保存下来的用户名及密码输入到对话框中,并点击“Log in”按钮:

image.png


我们终于看到了我们的第一个 Workplace Search 的第一个画面。这是我们的 Workplace

Search 的默认画面。从这里我们可以添加 Source,邀请用户及定制你的体验。

 


《Elastic Stack 实战手册》——三、产品能力——3.5 进阶篇——3.5.18.Enterprise Search —— 3.5.18.1.Workplace Search(5) https://developer.aliyun.com/article/1226986

相关实践学习
使用阿里云Elasticsearch体验信息检索加速
通过创建登录阿里云Elasticsearch集群,使用DataWorks将MySQL数据同步至Elasticsearch,体验多条件检索效果,简单展示数据同步和信息检索加速的过程和操作。
ElasticSearch 入门精讲
ElasticSearch是一个开源的、基于Lucene的、分布式、高扩展、高实时的搜索与数据分析引擎。根据DB-Engines的排名显示,Elasticsearch是最受欢迎的企业搜索引擎,其次是Apache Solr(也是基于Lucene)。 ElasticSearch的实现原理主要分为以下几个步骤: 用户将数据提交到Elastic Search 数据库中 通过分词控制器去将对应的语句分词,将其权重和分词结果一并存入数据 当用户搜索数据时候,再根据权重将结果排名、打分 将返回结果呈现给用户 Elasticsearch可以用于搜索各种文档。它提供可扩展的搜索,具有接近实时的搜索,并支持多租户。
相关文章
|
存储 算法 搜索推荐
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(2)
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(2)
|
搜索推荐 安全 文件存储
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(1)
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(1)
|
Ubuntu 物联网 大数据
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(6)
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(6)
103 0
|
存储 安全 Java
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(3)
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(3)
105 0
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(3)
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(5)
带你读《Elastic Stack 实战手册》之62:—— 3.5.18.1.Workplace Search(5)
|
数据采集 XML 存储
带你读《Elastic Stack 实战手册》之63:—— 3.5.18.2.Site Search(下)
带你读《Elastic Stack 实战手册》之63:—— 3.5.18.2.Site Search(下)
|
JavaScript 搜索推荐
带你读《Elastic Stack 实战手册》之63:—— 3.5.18.2.Site Search(中)
带你读《Elastic Stack 实战手册》之63:—— 3.5.18.2.Site Search(中)
|
搜索推荐 索引
带你读《Elastic Stack 实战手册》之63:—— 3.5.18.2.Site Search(上)
带你读《Elastic Stack 实战手册》之63:—— 3.5.18.2.Site Search(上)
134 0
|
缓存 数据库 索引
带你读《Elastic Stack 实战手册》之18:——3.4.2.3.Search通过Kibana(6)
带你读《Elastic Stack 实战手册》之18:——3.4.2.3.Search通过Kibana(6)
|
索引
带你读《Elastic Stack 实战手册》之18:——3.4.2.3.Search通过Kibana(4)
带你读《Elastic Stack 实战手册》之18:——3.4.2.3.Search通过Kibana(4)