Overview - Relevance score (_score)
What is it?
Relevance score, shown as _score in Elasticsearch, is a number that tells how well a document matches your search query. It helps rank search results so the most relevant ones appear first. The score is calculated based on how often the search terms appear and how important those terms are in the whole collection. This makes searching smarter and more useful.
Why it matters
Without relevance scores, search results would be random or just sorted by date or name, which might not help you find what you want quickly. Relevance scores solve the problem of ranking results by importance, saving time and improving user experience. This is crucial for search engines, online stores, and any system where finding the best match fast matters.
Where it fits
Before learning about relevance scores, you should understand basic Elasticsearch concepts like documents, fields, and queries. After this, you can explore advanced search features like boosting, custom scoring, and query tuning to improve search quality.