What if your search could magically know which results matter most to you?
Why Relevance score (_score) in Elasticsearch? - Purpose & Use Cases
Imagine you have a huge library of books and someone asks you to find the most useful books about "gardening." You try to look through each book one by one, guessing which might be best without any clear way to compare them.
Manually checking each book is slow and confusing. You might miss the best ones or pick less useful ones because you have no clear way to measure how well each book matches the request.
Elasticsearch gives each search result a relevance score called _score. This score tells you how well each result matches the search terms, so you can easily pick the best matches without guessing.
results = [] for book in library: if 'gardening' in book.text: results.append(book) # No ranking, just a list
results = elasticsearch.search(query='gardening') # Each result has a _score showing relevance
It lets you quickly find and rank the most relevant information from huge data collections, saving time and improving accuracy.
When you search for "best pizza places" on a review site, the results are ranked by how well they match your search, showing the tastiest and closest options first thanks to _score.
Manual searching is slow and unorganized.
_score ranks results by relevance automatically.
This helps find the best matches quickly and easily.