Percolator
Did you ever wonder what would happen if we reversed the traditional model of using queries to find documents? Does it make sense to find documents that match the queries? It's no surprise that there is an entire range of solutions where this model is very useful. Wherever you operate on unbounded streams of input data, where you search for occurrences of particular events, you can use this approach. This can be the detection of failures in a monitoring system or a "tell me when this product with defined criteria will be available in this shop" functionality. Let's see how the ElasticSearch percolator works and how it can handle this last example.
Preparing the percolator
The percolator looks like an additional index in ElasticSearch. This means that we can store any documents in it and obtain its mappings. We can also search it like an ordinary index. However, we spoke about the reversal of the standard behavior and treating queries as documents. Let's get the library example from...