﻿---
title: ES|QL MV_LESS function
description: 
url: https://www.elastic.co/elastic/docs-builder/docs/3941/reference/query-languages/esql/functions-operators/mv-functions/mv_less
products:
  - Elasticsearch
---

# ES|QL MV_LESS function
<applies-to>
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Planned
</applies-to>

Checks whether a multivalue field has any value less than a bound.

## Syntax

![Embedded](https://www.elastic.co/elastic/docs-builder/docs/3941/reference/query-languages/esql/images/generated/x-pack-esql/functions/mv_less.svg)


## Parameters

<definitions>
  <definition term="field">
    Multivalue expression to test. If null or empty, the function returns `false`.
  </definition>
  <definition term="bound">
    Comparison bound, of the same type as `field`. If null or multivalued, the function returns `false`.
  </definition>
  <definition term="options">
    (Optional) Bound inclusivity options.
  </definition>
</definitions>


## Description

Returns `true` if at least one value of `field` is less than `bound`, using the natural order of the type. A null or empty field returns `false`, as does a null or multivalued bound. The comparison is strict (`<`) by default; set `include_bound` to `true` in the optional `options` map to make it inclusive (`<=`). Works on any ordered type: numbers, dates, IPs, versions, and strings (compared by their UTF-8 bytes).

## Supported types


| field         | bound         | options          | result  |
|---------------|---------------|------------------|---------|
| date          | date          | named parameters | boolean |
| date          | date          |                  | boolean |
| date_nanos    | date_nanos    |                  | boolean |
| double        | double        | named parameters | boolean |
| double        | double        |                  | boolean |
| integer       | integer       | named parameters | boolean |
| integer       | integer       |                  | boolean |
| ip            | ip            |                  | boolean |
| keyword       | keyword       | named parameters | boolean |
| keyword       | keyword       |                  | boolean |
| keyword       | text          |                  | boolean |
| long          | long          | named parameters | boolean |
| long          | long          |                  | boolean |
| text          | keyword       |                  | boolean |
| text          | text          |                  | boolean |
| unsigned_long | unsigned_long |                  | boolean |
| version       | version       |                  | boolean |


### Supported function named parameters

<definitions>
  <definition term="include_bound">
    (boolean) Whether the bound is inclusive. Defaults to `false` (strict `<`); `true` makes it inclusive (`<=`).
  </definition>
</definitions>


## Examples

```esql
ROW values = [1, 5, 10]
| EVAL less = mv_less(values, 4)
```


| values:integer | less:boolean |
|----------------|--------------|
| [1, 5, 10]     | true         |

With `include_bound: true` a value equal to the bound matches too:
```esql
ROW values = [4]
| EVAL less = mv_less(values, 4, {"include_bound": true})
```


| values:integer | less:boolean |
|----------------|--------------|
| [4]            | true         |

Strings are compared by their UTF-8 bytes:
```esql
ROW words = ["apple", "cherry"]
| EVAL less = mv_less(words, "banana")
```


| words:keyword   | less:boolean |
|-----------------|--------------|
| [apple, cherry] | true         |