docs/main/administration-guide/scale/elasticsearch-setup.mdx
import Inc0_common_configure_mattermost_for_enterprise_search from './common-configure-mattermost-for-enterprise-search.mdx';
<PlanAvailability slug="ent-plus" />Elasticsearch allows you to search large volumes of data quickly, in near real-time, by creating and managing an index of post data. The indexing process can be managed from the System Console after setting up and connecting an Elasticsearch server. The post index is stored on the Elasticsearch server and updated constantly after new posts are made. In order to index existing posts, a bulk index of the entire post database must be generated.
Deploying Elasticsearch includes the following two steps: setting up Elasticsearch, and configuring Mattermost.
We highly recommend that you set up Elasticsearch server on a dedicated machine separate from the Mattermost Server.
systemd by running the following commands:shsudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service sudo systemctl start elasticsearch.service
shcurl localhost:9200
ship addr
vi by running the following command:shvi /etc/elasticsearch/elasticsearch.yml
network.host value of _eth0_ with your network interface name, and save your changes.action.destructive_requires_name to false in elasticsearch.yml to allow for wildcard operations to work.shsudo systemctl stop elasticsearch sudo systemctl start elasticsearch
shnetstat -plntYou should see the following ports, including the ones listening on ports 9200 and 9300. Confirm these are listening on your server's IP address.
/usr/share/elasticsearch/plugins directory by running the following command:shsudo /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu(Optional) CJK language analyzer plugins: To improve search for Korean, Japanese, or Chinese content, install one or more of the following language-specific analyzer plugins:
analysis-nori(Korean),analysis-kuromoji(Japanese), andanalysis-smartcn(Chinese).shsudo /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-nori sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-kuromoji sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-smartcnAfter installing the CJK plugins, restart Elasticsearch to load them:
shsudo systemctl restart elasticsearchThen enable the EnableCJKAnalyzers configuration setting. See Enabling Chinese, Japanese, and Korean Search for additional CJK search configuration options.
<div class="important"> <div class="title">Important
</div>If you enable CJK analyzers on a server with existing indexed content, you must purge and rebuild the search index in System Console > Environment > Elasticsearch for the CJK analyzers to take effect on existing posts.
</div>
shcurl 172.31.80.220:9200
Follow these steps to configure Mattermost to use your Elasticsearch server and to generate the post index:
true to enable the other the settings on the page. Once the configuration is saved, new posts made to the database are automatically indexed on the Elasticsearch server.elasticsearch.<Inc0_common_configure_mattermost_for_enterprise_search /> :start-after: :nosearch: