
本文共 10591 字,大约阅读时间需要 35 分钟。
������
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ like
������������������������������������������������������������������������������������������������������������������������������������������������ MySQL������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
��������� Elasticsearch
Elasticsearch
��������������� Apache Lucene
���������������������������������������������������������������������������������search���������������analysis������
Elasticsearch
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Elasticsearch
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
������ Apache Lucene
Apache Lucene
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
Lucene
��������������� Doug Cutting
��������������������� Java
������������������ 2001
���������������Lucene
������������������������������������������������������ Apache
���������������Apache Lucene
��������������� C++
���C#
���Python
������������������
Apache Lucene
������������������������������������������������������������������������������������������ ElasticSearch
���������Solr
������������ Apache Lucene
������������������������������������ MySQL
������������������Lucence
������������������������������ ElasticSearch
��� Solr
������������ MySQL
������������������
������������
������������ Elasticsearch
������������������������������������������������������������������������������������������������������������������������ Elasticsearch
������������������������
- ���������index���������������������������������������������������
- ���������������mapping type��������������������������������������������������� 7.x ��������������������������������������������� 8.x ���������������������������
- ���������document������������������������������������������������������
- ������field������������������������������������������������
- ���������mapping���������������������������������������������������������������������������������������������������������������������������������
mapping
������������������������
��������������� mapping type
������ mapping type
������������������������
- ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
ElasticSearch
������������������index
���������������mapping type
���������������������������������������������������������Lucence
���������������������������������������������������������������������������������������������������������������������������������mapping
������������������������������������������������������������������������������������������������ - ������������
index
���������������������������������������������mapping type
���������������������������������Lucene
������������������������������������������������������������������
��������� mapping type
��������������������������������������������������������������������������������� index
��������������������������� mapping type
���������������������������������������������
- ���������������������������������������������������������
Lucene
��������������������������� - ���������������������������������������������������������������������������������������������������������������������������
Elasticsearch ������������������
������ Elasticsearch
������������������������������������������������������������������������������������������������������������������������������ Elasticsearch
��� Java
��������������������� 1.8
������������������������������������������������ root
������������������������������������������������
��������� Elasticsearch
��������������������������� ES_HOME
���������
��������������� tar.gz
������ zip
������������������������������������������ $ES_HOME/config
��������������������������������������������� ES_PATH_CONF
���������������������������������������config
���������������������������������������������
- elasticsearch.yml������������������������
- jvm.options���
jvm
��������������� - log4j2.properties������������������������
������������������������
������ Elasticsearch
���������������������������������������������������������������������������������������������������������������
������ data ��� log
������ data
������ log
��������������������������������������������������������� $ES_HOME
���
path: data: /var/lib/elasticsearch logs: /var/log/elasticsearch
������ data
������������������������������������������������������������������������������
path: data: - /mnt/elasticsearch_1 - /mnt/elasticsearch_2 - /mnt/elasticsearch_3
���������������������cluster name���
��������������� Elasticsearch
��������������������������������������������������������������������������� elasticsearch
������������������������������������
cluster.name: logging-prod
������������������node name���
��������������������������������������������� API
��������������� Response
���������������������������������������������������������������������������������������������������������������
node.name: prod-data-2
������������ ip
��������������������������������������������������� ip
������������������������������������������������������������������������������������������������������������
network.host: 192.168.1.10
��������������������������������������������������������������������� 0.0.0.0
���
������������������������������������������ 0.0.0.0
���������������������������non-loopback address������������ Elasticsearch
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
bootstrap check failure [1] of [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
������������������
non-loopback address ������������������������������������������������������ 127
��������� ip
������������������������������������������������������������ 127.0.0.1
���ipv6
��������������� ::1
��������������������� localhost
��������������������������������� 127.0.0.1
��������� localhost
������������������������������������ 127.0.0.1
������ 127.0.0.1
��������������������� localhost
���������������������������������
������������������������
��������������������������������� network.host
������������������������������������������Elasticsearch
������������������������������������������������������������������������������������������������������
������ discovery.seed_hosts
���������������������Elasticsearch
������������������������������������������������ Elasticsearch
������������������������������������������ 9300
��� 9305
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ discovery.seed_hosts
������������ ip
������������������������������������������������������ 9300
������������ ivp6
��������������� []
������
discovery.seed_hosts: - 192.168.1.10:9300 - 192.168.1.11 - seeds.mydomain.com - [0:0:0:0:0:ffff:c0a8:10c]:9301
������������������������������������������������������������������ ip
������Elasticsearch
��������������������� ip
���
������ discovery.seed_providers
��������������� discovery.seed_hosts
��������������������������������������������� master
��������������������������������������� master
������������ node-master���true
��������������������������������������������������������������� discovery.seed_providers
���������������������������������������������������������������������������������������������������������������������������������������������������������
������ cluster.initial_master_nodes
��������������� Elasticsearch
������������������������������������������������������������ master
��������������������������������������������������������� discovery
������������������������������������������ Elasticsearch
��������������������������������������������������������������������������������������������������������������������������������������������������������������� master
������������������������������������������������������������������������
PS��������������������������������������������� node.name
���������������
������
���������������������������������������������������������������������������������������������
network.host: 0.0.0.0node.name: node-1cluster.initial_master_nodes: ["node-1"]
��������������������������������������� bin
��������������� ./elasticsearch
������������������������������������������������������������������ ./elasticsearch -d
���������
��������������������������� 9200
��������� http://ip:9200
������������������������������������������
���������������������
������������������������������������������ max_map_count
������������������������������������
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
������������ Elasticsearch
������������������ mappfs
��������������������������������������������������������� mmap
������������������������������������������������������������������������ RPM
������������������������������������
��� Linux
������������������������ sysctl -w vm.max_map_count=262144
��������������������������������������� sysctl vm.max_map_count
��������������������������������������������������� vim /etc/sysctl.conf
��������������������������������������� sysctl -p
���������������������
������
������������������������������ Elasticsearch
������������������������ Apache Lucene
��������������������������������� Elasticsearch
������������������������������������������������������������������������ Elasticsearch
������������������������������������������������������ Elasticsearch
������������������������������������������������������ Elasticsearch
������������������
发表评论
最新留言
关于作者
