Bird
Raised Fist0

You want to build an alert system that triggers when new documents match any stored queries. Which steps are necessary to implement this using percolate queries?

hard🚀 Application Q15 of Q15
Elasticsearch - Advanced Patterns

You want to build an alert system that triggers when new documents match any stored queries. Which steps are necessary to implement this using percolate queries?

AUse aggregation queries on documents to find alerts
BStore documents in a normal index, then run a regular search for alerts
CCreate an index with a percolator field, store queries, then percolate new documents against stored queries
DCreate a nested field for queries and filter documents manually
Step-by-Step Solution
Solution:
  1. Step 1: Setup index with percolator field

    Define an index mapping with a "percolator" type field to store queries for reverse matching.
  2. Step 2: Store queries and percolate new documents

    Index the alert queries into the percolator field, then use percolate queries to check if new documents match any stored queries.
  3. Final Answer:

    Create an index with a percolator field, store queries, then percolate new documents against stored queries -> Option C
  4. Quick Check:

    Percolate queries enable alerting by matching docs to stored queries [OK]
Quick Trick: Store queries in percolator field, then percolate new docs [OK]
Common Mistakes:
MISTAKES
  • Using regular search instead of percolate queries
  • Not defining percolator field in mapping
  • Trying to use aggregations for alerting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes