Skip to content

Instantly share code, notes, and snippets.

@jgeek
Last active March 25, 2022 10:57
Show Gist options
  • Save jgeek/d98a62fb415228d452ada4426e58be85 to your computer and use it in GitHub Desktop.
Save jgeek/d98a62fb415228d452ada4426e58be85 to your computer and use it in GitHub Desktop.
elastic search
shards and reps
text field : ignore above
set 'doc_values'/'norms'/'index' for false to save disk if not necessary
set 'doc_values' to false: if sorting, scrpting and aggregation are not needed
setting norms to false: if relevance scoring is not needed
setting index to false: if do not need to filtering on values. still can be use for aggregation (time series)
set dynamic_mapping to strict
dont always map strings to text and keyword
disable corecion
integer is enough than long and float often cover our need instead of double
numner of shards
mappigns
analyzers
kibana load?
lsblk
sudo mkfs.ext4 /dev/sdb
sudo swapoff -a
sudo sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install apt-transport-https ca-certificates gnupg2 -y
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch |sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update -y
apt-get install elasticsearch -y
sudo mkdir /data/es
sudo mkdir /data/es/logs
sudo mkdir /data/es/data
sudo chown elasticsearch:elasticsearch /data/es
sudo chown elasticsearch:elasticsearch /data/es/logs
sudo chown elasticsearch:elasticsearch /data/es/data
sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch
systemctl status elasticsearch.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment