﻿---
title: ES|QL SCORE function
description: 
url: https://www.elastic.co/elastic/docs-builder/docs/2909/reference/query-languages/esql/functions-operators/search-functions/score
products:
  - Elasticsearch
---

# ES|QL SCORE function
<applies-to>
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview since 9.3
</applies-to>


## Syntax

![Embedded](https://www.elastic.co/elastic/docs-builder/docs/2909/reference/query-languages/esql/images/functions/score.svg)


## Parameters

<definitions>
  <definition term="query">
    Boolean expression that contains full text function(s) to be scored.
  </definition>
</definitions>


## Description

Scores an expression. Only full text functions will be scored. Returns scores for all the resulting docs.

## Supported types


| query   | result |
|---------|--------|
| boolean | double |


## Example

```esql
FROM books METADATA _score
| WHERE match(title, "Return") AND match(author, "Tolkien")
| EVAL first_score = score(match(title, "Return"))
```