-
Book Overview & Buying
-
Table Of Contents
Elasticsearch Query Language the Definitive Guide
By :
Now that you're comfortable with the ES|QL environment, we can look at how you can interact with and manipulate this data using expressions in ES|QL.An ES|QL query begins with a source command, which specifies the data stream, index, or alias from which to retrieve data. This is followed by one or more processing commands, each separated by a pipe. The final processing command in the sequence determines the output of the query.Here's an example of a source command:
from retro_arcade_purchases_dataset
| [...]
We can then add our processing commands:
| where discount_applied == "True" and game_description like "* action *"
| sort price_at_purchase desc
| keep price_at_purchase, discount_applied, game_description
Figure 2.5 shows this code with a breakdown of each aspect:

An expression in ES|QL is a combination of literals, fields, and operators that evaluates to a single value. Expressions...
Change the font size
Change margin width
Change background colour