Recall & Review
beginner
What is the _score in Elasticsearch?
The _score is a number that shows how well a document matches the search query. A higher score means a better match.
Click to reveal answer
intermediate
How does Elasticsearch calculate the _score?
Elasticsearch uses a formula called TF-IDF (Term Frequency-Inverse Document Frequency) or BM25 to calculate _score. It looks at how often a word appears in a document and how rare the word is across all documents.
Click to reveal answer
beginner
What does a higher _score mean for a search result?
A higher _score means the document is more relevant to the search query and will appear higher in the search results list.
Click to reveal answer
intermediate
Can you influence the _score in Elasticsearch?
Yes! You can influence _score by boosting certain fields or terms, using function score queries, or changing the similarity algorithm.
Click to reveal answer
intermediate
What happens if two documents have the same _score?
If two documents have the same _score, Elasticsearch will order them by their internal document ID or other tie-break rules, but they are considered equally relevant.
Click to reveal answer
What does a higher _score indicate in Elasticsearch?
✗ Incorrect
A higher _score means the document matches the search query better and is more relevant.
Which algorithm is commonly used by Elasticsearch to calculate _score?
✗ Incorrect
Elasticsearch uses BM25 (a ranking function) to calculate the relevance score.
How can you increase the _score of a document?
✗ Incorrect
Boosting important fields increases their weight, raising the document's _score.
If two documents have the same _score, how does Elasticsearch decide their order?
✗ Incorrect
Elasticsearch uses internal document ID or tie-break rules to order documents with the same _score.
What does TF-IDF stand for in the context of _score?
✗ Incorrect
TF-IDF means Term Frequency-Inverse Document Frequency, a method to weigh terms for scoring.
Explain what the _score represents in Elasticsearch and why it matters.
Think about how Elasticsearch decides which documents to show first.
You got /3 concepts.
Describe two ways you can influence or change the _score of documents in Elasticsearch.
Consider how you can make some documents more important than others.
You got /3 concepts.