Practise vocabulary for Elasticsearch/OpenSearch query DSL: match, bool, filter, aggregations, boosting, and query types.
0 / 10 completed
1 / 10
A ___ query in Elasticsearch performs full-text search on a field, applying the field's analyser to the query string.
A match query is the standard full-text query — it analyses the query string using the field's analyser and returns documents containing matching tokens. 'match' queries are scored by relevance; 'term' queries are exact matches.
2 / 10
A ___ query combines multiple query clauses: must (required), should (optional scoring), must_not (exclusion), and filter (no scoring).
The bool query is the main compound query in Elasticsearch. must clauses must match (affect score); should clauses optionally boost score; must_not excludes documents; filter includes documents without affecting score (cached).
3 / 10
Filter clauses in a bool query are ___ than must clauses because they don't compute relevance scores and their results are cached.
Filter clauses are faster: they make binary include/exclude decisions (no scoring), and their results are cached in the filter cache. Use filter for structured data (dates, status, category); use must for full-text scoring.
4 / 10
A search ___ groups documents into buckets and computes metrics — for example, counting products per category or calculating average price.
Aggregations provide analytics on search results: bucket aggregations (terms, date_histogram, range) group documents; metric aggregations (avg, sum, min, max, cardinality) compute statistics within buckets.
5 / 10
___ allows certain fields or documents to be ranked higher by multiplying or adding to their relevance score.
Boosting adjusts relevance scores: field boosting (^2 in query_string) makes matches in a field more important; function_score with boost_factor can boost documents based on business rules (e.g., featured products).
6 / 10
During a code review of a new feature for our e-commerce platform, Sarah comments: 'This query seems inefficient; it's scanning the entire `orders` table when we could use an index on `customer_id`. Could you explain how to optimize this using a more targeted query construction approach?' Which statement best reflects her concern regarding query design?
Sarah's comment highlights the importance of minimizing full table scans – these are often performance bottlenecks. While `bool` queries with `must` clauses can be helpful, her specific suggestion regarding indexing is the core principle she's advocating for. The other options misrepresent the benefits of indexing or incorrectly characterize query types; a `term` query isn't typically more efficient than a `match` in this scenario.
7 / 10
You're drafting a pull request description for an update to the user authentication service. You need to explain how you've improved query performance by utilizing a `filter` clause within a `bool` query. Which of the following best describes this approach?
The `filter` clause is key here. It's designed for non-scoring conditions – meaning it doesn't impact relevance scores or leverage the caching mechanisms associated with `must` clauses. This makes it ideal for applying business rules without impacting performance. The other options describe different query types (exclusion, role-based filtering, or exact term matching) that wouldn't achieve the same goal of optimizing a `bool` query for speed and caching.
8 / 10
During a Slack discussion with your team regarding API responses from our payment gateway, Alex asks: 'How can I efficiently retrieve only transactions exceeding $100 using the API?' Which query construction technique would be MOST appropriate to address this requirement?
The most efficient way to filter API responses based on a numerical criterion (like transaction amount) is through a `filter` clause. This allows the API to directly apply the numeric comparison without any scoring or relevance calculations. The other options represent incorrect approaches – using `match` for numeric filtering, indexing solely for full-text searching, or utilizing a `term` query for exact string values.
9 / 10
As the lead developer on a new data analytics project, you're exploring how to group customer purchase data by product category. Which Elasticsearch command would be MOST suitable for this task?
The `terms` aggregation is specifically designed to group documents based on distinct values within a specified field (in this case, 'category'). This creates buckets containing all documents sharing that category value. The other options represent incorrect uses of Elasticsearch aggregations – using `term` for counting, `match` for unstructured data, or `scripted` for complex calculations.
10 / 10
You're reviewing a query designed to rank search results based on relevance. The query includes a `score_mode` of 'strict'. What does this primarily influence?
The `score_mode: 'strict'` setting means that documents containing *exact* matches for the search terms will receive a significantly higher relevance score than documents with partial or inexact matches. This is because it treats those exact matches as definitive indicators of relevance, overriding any other scoring factors. The other options describe different aspects of query scoring – ordering, field weighting, and caching.
What will I learn from the "Query Construction Vocabulary" exercise?
Practise vocabulary for Elasticsearch/OpenSearch query DSL: match, bool, filter, aggregations, boosting, and query types.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall required.
How many questions are in this exercise?
This set contains 10 multiple-choice questions, each with a detailed explanation shown after you answer.
Do I need to create an account to track my progress?
No account is required. Your progress bar and score reset each time you reload the page, but you can retry the exercise as many times as you like.
Who is this Search Engineering Language exercise for?
This exercise is built for IT professionals and non-native English speakers who need to read, write, and discuss search engineering language topics confidently at work.
What happens if I answer a question incorrectly?
You will see the correct answer highlighted along with a detailed explanation of why it is correct -- so every wrong answer becomes a learning moment, not just a lost point.
Can I retry this exercise?
Yes -- click "Try again" on the results screen at any time to reset your score and go through all the questions again.
How long does this exercise take to complete?
Most learners finish all 10 questions in under 10 minutes, since each question is answered by clicking a single option.
Where can I find more Search Engineering Language exercises?
See the full Search Engineering Language exercises hub for more vocabulary drills on this topic.
Is this exercise mobile-friendly?
Yes -- the exercise works on any device with a modern browser, including phones and tablets, with no app download required.