ElasticSearch Research & Evidence-Based Practice 5 — Questions and Answers
Question 1: A research platform implements a 'did you mean?' feature for search queries over biomedical literature. Which suggester type is best for suggesting alternative phrases when the entire query phrase has low term frequency?
- term suggester
- phrase suggester (Correct answer)
- completion suggester
- context suggester
Correct answer: phrase suggester
The phrase suggester evaluates whole-phrase candidates using a language model and collocation statistics, making it superior for multi-word suggestion corrections.
Question 2: Analysts need to identify co-occurring keywords across all research abstracts to map evidence themes. Which aggregation pipeline produces pairwise co-occurrence counts efficiently?
- significant_terms aggregation
- matrix_stats aggregation
- adjacency_matrix aggregation (Correct answer)
- geo_distance aggregation
Correct answer: adjacency_matrix aggregation
The adjacency_matrix aggregation creates a matrix of bucket counts for all combinations of filters, enabling pairwise co-occurrence analysis between keyword groups.
Question 3: A researcher wants to find papers that are semantically similar to a reference paper using dense vector embeddings. Which Elasticsearch query type supports this use case?
- more_like_this query
- knn query on a dense_vector field (Correct answer)
- percolate query
- script_score query with TF-IDF
Correct answer: knn query on a dense_vector field
The knn (k-nearest neighbor) query finds the top-k documents whose dense_vector embeddings are closest to a provided query vector, enabling semantic similarity search.
Question 4: A research index needs to surface statistically unusual keywords in a subset of recent papers compared to the full corpus. Which aggregation identifies terms that appear disproportionately often in a foreground set?
- terms aggregation with size: 20
- significant_terms aggregation (Correct answer)
- sampler aggregation
- rare_terms aggregation
Correct answer: significant_terms aggregation
significant_terms aggregation compares term frequencies in a foreground set against a background set, surfacing terms that are statistically over-represented in the subset.
Question 5: A research indexing pipeline receives large batches of publications every hour. To maximize indexing throughput, which client-side strategy is most effective?
- Index each document with a separate index API call
- Use the Bulk API to send documents in batches (Correct answer)
- Use the multi-get (mget) API for batch processing
- Enable refresh_interval: 1s on the index
Correct answer: Use the Bulk API to send documents in batches
The Bulk API reduces per-document HTTP overhead by processing multiple index, update, or delete actions in a single request, significantly improving throughput.
Question 6: Researchers need to run an expensive aggregation query over millions of research records without blocking real-time search traffic. Which Elasticsearch feature enables non-blocking long-running queries?
- Search timeout parameter
- Async search API (Correct answer)
- Point-in-time (PIT) API
- Scroll API
Correct answer: Async search API
The Async search API submits a long-running query and immediately returns a search ID; the caller polls for results later, avoiding blocking while the query executes.
Question 7: A research team uses Elasticsearch percolator to notify subscribers when new papers matching their saved queries are indexed. Which mapping type must a field have to store percolator queries?
- keyword
- object
- percolator (Correct answer)
- nested
Correct answer: percolator
The percolator field type stores a query DSL as a document field, enabling Elasticsearch to match incoming documents against stored queries during a percolate query.
A research platform implements a 'did you mean?' feature for search queries over biomedical literature.
Which suggester type is best for suggesting alternative phrases when the entire query phrase has low term frequency?