# SQL match function

**URL:** <https://discuss.elastic.co/t/sql-match-function/298922>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-sql\
**Created:** [March 6, 2022, 8:06pm UTC](https://discuss.elastic.co/t/sql-match-function/298922 "2022-03-06T20:06:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![avnere](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@avnere](https://discuss.elastic.co/u/avnere)\
**Post date:** [March 6, 2022, 8:06pm UTC](https://discuss.elastic.co/t/sql-match-function/298922/1 "2022-03-06T20:06:15Z")

</div>

Hi,

I am looking how to perform LIKE on text type. I found a way by MATCH.

1. Is MATCH is Elasticsearch SQL unique function or native SQL? for example: MATCH(foo, 'bar')

2. Are there more options to perform LIKE on text type?

3. Is there a way to use MATCH AGAINST syntax?  
[`MATCH (col1` , _`col2`_ ,...) AGAINST ( _`expr`_ [ _`search_modifier`_])]

Thanks...

---

<div class="post-metadata">

**Author:** ![Andrei\_Stefan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrei_stefan/32/47533_2.png) [@Andrei\_Stefan](https://discuss.elastic.co/u/Andrei_Stefan)\
**Post date:** [March 7, 2022, 8:18am UTC](https://discuss.elastic.co/t/sql-match-function/298922/2 "2022-03-07T08:18:00Z")

</div>

Both `MATCH` and `QUERY` functions are ES SQL specific: [Full-Text Search Functions | Elasticsearch Guide [7.16] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/sql-functions-search.html)

`LIKE` only works on "exact" fields (doesn't work on `text`). I suggest reading the link above about the two functions, they cover a lot of scenarios and I don't think you need `AGAINST`.

---

<div class="post-metadata">

**Author:** ![avnere](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@avnere](https://discuss.elastic.co/u/avnere)\
**Post date:** [March 7, 2022, 8:46am UTC](https://discuss.elastic.co/t/sql-match-function/298922/3 "2022-03-07T08:46:31Z")

</div>

Will Like works on text when sending the query through ODBC\JDBC?

---

<div class="post-metadata">

**Author:** ![Andrei\_Stefan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrei_stefan/32/47533_2.png) [@Andrei\_Stefan](https://discuss.elastic.co/u/Andrei_Stefan)\
**Post date:** [March 7, 2022, 5:39pm UTC](https://discuss.elastic.co/t/sql-match-function/298922/4 "2022-03-07T17:39:23Z")

</div>

No. JDBC/ODBC is just an interface. The query engine is the same.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 4, 2022, 5:39pm UTC](https://discuss.elastic.co/t/sql-match-function/298922/5 "2022-04-04T17:39:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
