O'Reilly logo

Elasticsearch in Action by Matthew Lee Hinman Radu Gheorghe and Roy Russo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix E. Turning search upside down with the percolator

The Elasticsearch percolator is typically defined as “search upside down” for the following reasons:

  • You index queries instead of documents. This registers the query in memory, so it can be quickly run later.
  • You send a document to Elasticsearch instead of a query. This is called percolating a document, basically indexing it into a small, in-memory index. Registered queries are run against the small index, so Elasticsearch finds out which queries match.
  • You get back a list of queries matching the document, instead of the other way around like a regular search.

The typical use case for percolation is alerting. As shown in figure E.1, you can notify users when new documents (matching ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required