1
==============================================
2
Tips On Effectively Working With Elasticsearch
3
==============================================
7
ES can be queried on the command-line using a number of tools. Most common is
8
curl. However httpie gives a nicer output, so most examples here will be used
9
with it. The webops may not have httpie installed, so the curl version will
10
be needed if asking them to run queries on production.
12
== Installing httpie ==
14
$ sudo pip install httpie
18
$ http localhost:9200/_aliases
20
Assume the response showed 'charm-48885' as the most recent index. It will be
21
used in all following examples.
25
$ http localhost:9200/charms-48885
27
= Getting minimal data for everything =
29
$ http localhost:9200/_search?size=5000 <<< '{"fields":[], "query": {"match_all": {}}}'
31
$ curl localhost:9200/_search?pretty\&size=5000 -d '{"fields":[], "query": {"match_all": {}}}'