<commit_before>.TH Elasticsearch Cheatsheet 7 2019-07-06 "Elasticsearch Cheatsheet" "<NAME>"
.SH NAME
Elasticsearch \- Cheatsheet
.SH SYNOPSIS
.PP
Cheatsheet for Elasticsearch
.\" .SH NOTE
.\" .PP
.\" .SH DESCRIPTION
.\" .PP

.\" -------------------------------------------------------------------------

.SH Cluster

.SS Version
.PP
curl -XGET 'http://localhost:9200'

.SS Retrieve simple status on the health of the cluster
.PP
curl -XGET http://localhost:9200/_cluster/health?pretty

.SS Access to metadata representing the state of the whole cluste
.PP
curl -XGET http://localhost:9200/_cluster/State

.SS Retrieve statistics from a cluster wide perspective
.PP
curl -XGET http://localhost:9200/_cluster/stats?human&pretty

.SS Retrieve one or more (or all) of the cluster nodes information
.PP
curl -XGET http://localhost:9200/_nodes
.PP
curl -XGET http://localhost:9200/_nodes/nodeId1,nodeId2

.SS Retrieve one or more (or all) of the cluster nodes statistics
.PP
curl -XGET http://localhost:9200/_nodes/stats
.PP
curl -XGET http://localhost:9200/_nodes/nodeId1,nodeId2/stats

.\" -------------------------------------------------------------------------

.SH Cat commands

.SS Health
.PP
curl -XGET http://localhost:9200/_cat/health?v

.SS Nodes
.PP
curl -XGET http://localhost:9200/_cat/nodes?v

.SS Which indices are yellow
.PP
curl -XGET http://localhost:9200/_cat/indices?v&health=yellow

.SS Which index has the largest number of documents
.PP
curl -XGET http://localhost:9200/_cat/indices?v&s=docs.count:desc

.\" -------------------------------------------------------------------------

.SS List indexes and sort them by size
.PP
curl -XGET 'http://localhost:9200/_cat/indices?v&s=store.size:desc'
<commit_msg>Add: man page for Elasticsearch<commit_after>.TH Elasticsearch Cheatsheet 7 2019-07-06 "Elasticsearch Cheatsheet" "<NAME>"
.SH NAME
Elasticsearch \- Cheatsheet
.SH SYNOPSIS
.PP
Cheatsheet for Elasticsearch
.\" .SH NOTE
.\" .PP
.\" .SH DESCRIPTION
.\" .PP

.\" -------------------------------------------------------------------------

.SH Cluster

.SS Version
.PP
curl -XGET 'http://localhost:9200'

.SS Retrieve simple status on the health of the cluster
.PP
curl -XGET http://localhost:9200/_cluster/health?pretty

.SS Access to metadata representing the state of the whole cluste
.PP
curl -XGET http://localhost:9200/_cluster/State

.SS Retrieve statistics from a cluster wide perspective
.PP
curl -XGET http://localhost:9200/_cluster/stats?human&pretty

.SS Retrieve one or more (or all) of the cluster nodes information
.PP
curl -XGET http://localhost:9200/_nodes
.PP
curl -XGET http://localhost:9200/_nodes/nodeId1,nodeId2

.SS Retrieve one or more (or all) of the cluster nodes statistics
.PP
curl -XGET http://localhost:9200/_nodes/stats
.PP
curl -XGET http://localhost:9200/_nodes/nodeId1,nodeId2/stats

.SS Show Garbage collector informations
.PP
curl -XGET "http://localhost:9200/_cat/nodes?h=heap*&v"

.\" -------------------------------------------------------------------------

.SH Cat commands

.SS Health
.PP
curl -XGET http://localhost:9200/_cat/health?v

.SS Nodes
.PP
curl -XGET http://localhost:9200/_cat/nodes?v

.SS Which indices are yellow
.PP
curl -XGET http://localhost:9200/_cat/indices?v&health=yellow

.SS Which index has the largest number of documents
.PP
curl -XGET http://localhost:9200/_cat/indices?v&s=docs.count:desc

.\" -------------------------------------------------------------------------

.SS List indexes and sort them by size
.PP
curl -XGET 'http://localhost:9200/_cat/indices?v&s=store.size:desc'

{'fraction_non_alphanumeric': 0.23087699635752312, 'fraction_numerical': 0.037545530961053515, 'mean_word_length': 2.330223880597015, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '398301', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1066, 'n_words': 337}