
Elasticsearch 5.x Cookbook
By :

In every application, it's very common to search a range of values. The most common standard scenarios are:
Filtering by numeric value range (that is, price, size, and age)
Filtering by date (that is, events of 03/07/12
can be a range query from 03/07/12 00:00:00
to 03/07/12 24:59:59
)
Filtering by term range (that is, from A to D)
You need an up-and-running Elasticsearch installation as we described in the Downloading and installing Elasticsearch recipe in Chapter 2, Downloading and Setup.
To execute curl
via the command line, you need to install curl
for your operative system.
To correctly execute the following commands, you need an index populated with the chapter_05/populate_query.sh
script available in the online code.
For executing a range query, we will perform the following steps:
Consider the sample data of the previous examples, which contains an integer field position
; using it to execute a query for filtering positions between 3
and 5
...
Change the font size
Change margin width
Change background colour