
ElasticSearch Cookbook
By :

After having inserted documents, the most common executed action in ElasticSearch is the search. The official ElasticSearch client APIs for searching are similar to the REST one.
You need a working ElasticSearch cluster and required packages of the Creating a client recipe of this chapter.
The code of this recipe is in the chapter_11/searching.py
and chapter_11/searching_pyes.py
files.
To execute a standard query, the client search method must be called passing the query parameters as we saw in Chapter 5, Search, Queries, and Filters. The required parameters are at least the index name, the type name, and the query DSL. In the following example I'll show how to call a match all query, a term query and a filter query. We need to perform the following steps:
import elasticsearch from pprint import pprint es = elasticsearch.Elasticsearch() index_name = "my_index"...
Change the font size
Change margin width
Change background colour