elasticsearch.rst
changeset 2202 37bf9f7b8560
parent 2199 47cadb10f1df
child 2203 c9cc487f54a3
equal deleted inserted replaced
2201:af2d2e117b4e 2202:37bf9f7b8560
    18 ====================
    18 ====================
    19 
    19 
    20 Cluster health::
    20 Cluster health::
    21 
    21 
    22   GET /_cat/health?v
    22   GET /_cat/health?v
       
    23   GET /_cluster/health?pretty
       
    24   GET /_cluster/health?pretty&level=cluster
    23 
    25 
    24 List of nodes in cluster::
    26 List of nodes in cluster (ip, RAM, CPU)::
    25 
    27 
    26   GET /_cat/nodes?v
    28   GET /_cat/nodes?v
    27   GET /_cat/master?v
    29   GET /_cat/master?v
    28 
    30 
    29 List of indexes::
    31 List cluster state::
       
    32 
       
    33   GET /_cluster/state?pretty
       
    34 
       
    35 List of indexes (status, health, size)::
    30 
    36 
    31   GET /_cat/indices
    37   GET /_cat/indices
    32   GET /_cat/indices?v
    38   GET /_cat/indices?v
    33   GET /_cat/indices?v&s=index
    39   GET /_cat/indices?v&s=index
       
    40   GET /_cluster/health?pretty&level=indices
    34 
    41 
    35 List of mappings across all indexes::
    42 List of mappings across all indexes::
    36 
    43 
    37   GET /_mapping
    44   GET /_mapping
    38   GET /_all/_mapping
    45   GET /_all/_mapping
       
    46 
       
    47 List of shards::
       
    48 
       
    49   GET /_cluster/health?pretty&level=shards
    39 
    50 
    40 https://www.elastic.co/guide/en/elasticsearch/reference/current/_cluster_health.html
    51 https://www.elastic.co/guide/en/elasticsearch/reference/current/_cluster_health.html
    41   Cluster Health.
    52   Cluster Health.
    42 https://www.elastic.co/guide/en/elasticsearch/reference/current/_list_all_indices.html
    53 https://www.elastic.co/guide/en/elasticsearch/reference/current/_list_all_indices.html
    43   List All Indices.
    54   List All Indices.
    45   cat APIs.
    56   cat APIs.
    46 
    57 
    47 Managing indexes
    58 Managing indexes
    48 ================
    59 ================
    49 
    60 
       
    61 Assign number of shards and replicas::
       
    62 
       
    63   curl -XPUT -d '{settings: {index: "number_of_shards": 3, "number_of_replicas": 1}}'
       
    64 
    50 https://www.elastic.co/guide/en/elasticsearch/reference/current/_delete_an_index.html
    65 https://www.elastic.co/guide/en/elasticsearch/reference/current/_delete_an_index.html
    51   Delete an Index.
    66   Delete an Index.
       
    67 https://github.com/elastic/curator
       
    68   Manage/archive indices.
       
    69 https://www.elastic.co/guide/en/elasticsearch/client/curator/current/about.html
       
    70   Elasticsearch Curator helps you curate, or manage, your Elasticsearch indices and snapshots.
       
    71 https://www.elastic.co/guide/en/elasticsearch/client/curator/current/about-features.html
       
    72   Curator allows for many different operations to be performed to both indices and snapshots.
    52 
    73 
       
    74 https://www.elastic.co/guide/en/elasticsearch/guide/current/retiring-data.html
       
    75   Retiring Data.
       
    76 
       
    77 Lucene search syntax
       
    78 ====================
       
    79 
       
    80 ``TERM1 TERM2`` is same as ``TERM1 OR TERM2``.
       
    81 
       
    82 ``"TERM1 TERM2"`` is for phrase.
       
    83 
       
    84 ``"TERM1 TERM2"~5`` is for proximity.
       
    85 
       
    86 ``TERM~0.8`` is for fuzzy.
       
    87 
       
    88 ``*`` is for wildcard.
       
    89 
       
    90 Boosting is done with ``^N`` syntax, like ``TERM1^10 TERM2``.
       
    91 
       
    92 Range with ``[2017-01-01 TO 2017-02-29]``.
       
    93 
       
    94 Logical ``AND``, ``OR``, ``NOT`` and parentheses for grouping.
       
    95 
       
    96 Fields are set before colon, like ``FIELD:TERM``.
       
    97 
       
    98 https://www.elastic.co/guide/en/elasticsearch/reference/master/query-dsl-query-string-query.html
       
    99   Query String Query
       
   100 https://www.elastic.co/guide/en/elasticsearch/reference/master/query-dsl-simple-query-string-query.html
       
   101   Simple Query String Query
       
   102 
       
   103 Performance
       
   104 ===========
       
   105 
       
   106 https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-profile.html
       
   107   Profile API.
       
   108 https://www.elastic.co/guide/en/elasticsearch/reference/current/_explain_analyze.html
       
   109   Explain Analyze.
       
   110 https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html
       
   111   Explain API.
       
   112 
       
   113 https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-indexing-speed.html
       
   114   Tune for indexing speed.
       
   115 https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-search-speed.html
       
   116   Tune for search speed.
       
   117 
       
   118 JSON search syntax
       
   119 ==================
       
   120 
       
   121 https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html
       
   122   Search results pagination.
       
   123 https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
       
   124   Query String Query.
       
   125 https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html
       
   126   Aggregation.
       
   127 https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html
       
   128   Sort.
       
   129 
       
   130 Alerting
       
   131 ========
       
   132 
       
   133 https://github.com/Yelp/elastalert
       
   134   Easy & Flexible Alerting With Elasticsearch.
       
   135 http://elastalert.readthedocs.io/en/latest/elastalert.html
       
   136   Easy & Flexible Alerting With Elasticsearch.
       
   137 https://github.com/sirensolutions/sentinl/wiki/SENTINL-Alerts-in-Dashboard
       
   138   SENTINL Alerts in Dashboard.
       
   139 https://github.com/sirensolutions/sentinl/wiki/SENTINL-Config-Example
       
   140   SENTINL Config Example
       
   141 https://github.com/sirensolutions/sentinl/wiki/SENTINL-Tutorial
       
   142   SENTINL Tutorial
       
   143 https://github.com/sirensolutions/sentinl/wiki/SENTINL-Watcher-Anatomy
       
   144   SENTINL Watcher Anatomy
       
   145 https://github.com/sirensolutions/sentinl/wiki/SENTINL-Watcher-Examples
       
   146   SENTINL Watcher Examples
       
   147 
       
   148 https://sematext.com/blog/x-pack-alternatives/
       
   149   X-Pack Alternatives
       
   150