---
title: ES|QL V_DOT_PRODUCT function
description: 
url: https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/dense-vector-functions/v_dot_product
products:
  - Elasticsearch
---

# ES|QL V_DOT_PRODUCT function
<applies-to>
  - Elastic Stack: Preview in 9.3
</applies-to>


## Syntax

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


## Parameters

<definitions>
  <definition term="left">
    first dense_vector to calculate dot product similarity
  </definition>
  <definition term="right">
    second dense_vector to calculate dot product similarity
  </definition>
</definitions>


## Description

Calculates the dot product between two dense_vectors.

## Supported types


| left         | right        | result |
|--------------|--------------|--------|
| dense_vector | dense_vector | double |


## Example

```esql
from colors
| eval similarity = v_dot_product(rgb_vector, [0, 255, 255])
| sort similarity desc, color asc
```


| color:text | similarity:double |
|------------|-------------------|
| azure      | 130050.0          |
| cyan       | 130050.0          |
| white      | 130050.0          |
| mint cream | 128775.0          |
| snow       | 127500.0          |
| honeydew   | 126225.0          |
| ivory      | 126225.0          |
| sea shell  | 123165.0          |
| lavender   | 122400.0          |
| old lace   | 121125.0          |