# MATCH

`MATCH` is a function used to execute a match query on a specified field. It works on various field types including text fields, boolean, dates, and numeric types. It returns 'true' when the provided query matches the row.

## Syntax

`MATCH (field, query)`

### Parameters

#### `field`

This represents the field that the query will target. If the field contains multiple values,
`MATCH` will process each value.

#### `query`

This is the value that is being searched in the provided field.

## Examples

In this example, `"Faulkner"` is matched against the `author` field in `books` data. `MATCH` returns true if it finds the provided query, in this case `"Faulkner"` in the author field. The query then keeps the columns `book_no` and `author`, sorts by `book_no` and limits the result to 5.

```esql
FROM books
| WHERE MATCH(author, "Faulkner")
| KEEP book_no, author
| SORT book_no
| LIMIT 5;
```

## Notes

- Do not use `MATCH` in production -  it is in technical preview and may be changed or removed in a future release
- `MATCH` relies on Elasticsearch Match query under the hood, and should be used for full-text search only. For more traditional
  text matching, `LIKE` or `RLIKE` should be used instead.
