AGIS documentation

Команды elasticsearch

Updated:

The documentation is currently available in Russian. The interface is translated; article texts are in the original language.

For a concise list of all indices in your cluster, call

$ curl http://localhost:9200/_aliases

this will give you a list of indices and their aliases.
If you want it pretty-printed, add pretty=true:

$ curl http://localhost:9200/_aliases?pretty=true
$ curl 'localhost:9200/_cat/indices?v'
$ curl --silent 'http://127.0.0.1:9200/_cat/indices' | cut -d  -f3
$ curl -s 'http://localhost:9253/_cat/indices'

Удалить все индексы

$ curl -XDELETE localhost:41605/_all

Удалить инлекс abonents-physical

$ curl -XDELETE localhost:41605/abonents-physical

Создать резервную копию индекса abonents-physical, используя elasticbackup

$ ~/.local/bin/elasticbackup localhost:40505 abonents-physical
$ ~/.local/bin/elasticbackup localhost:40505 address

Восстановить резервную копию индекса abonents-physical, используя elasticrestore

$ ~/.local/bin/elasticrestore -m ./abonents-physical-mappings-20201227.json -d abonents-physical-documents-20201227.json localhost:9200 abonents-physical

Вывод 10 записей по умолчанию

$ curl  http://localhost:9200/abonents-physical/_search?pretty=true&q=*:*

Вывод 100 записей

$ curl  http://localhost:9200/abonents-physical/_search?size=100&pretty=true&q=*:*