User Tools

Site Tools


elasticsearch

This is an old revision of the document!


Elasticsearch Cheat Sheet

update_by_query

POST /index/_update_by_query
{
  "script": "ctx._source.field = 'correct value'",
  "query": {
    "term": {
      "field": "wrong value"
    }
  }
}

backup

Add backup directory to repository

$ grep backup /srv/elk/elasticsearch/config/elasticsearch.yml
path.repo: [ "/backup" ]

Register snapshot repository

PUT /_snapshot/backup
{
  "type": "fs",
  "settings": {
    "location": "/backup",
    "compress": "true"
  }
}
elasticsearch.1545839991.txt.gz · Last modified: 2018/12/26 16:59 by baumi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki