# What is equivalent query as SQL LIKE clause?

**URL:** <https://discuss.elastic.co/t/what-is-equivalent-query-as-sql-like-clause/69258>\
**Category:** Elasticsearch\
**Created:** [December 16, 2016, 7:59am UTC](https://discuss.elastic.co/t/what-is-equivalent-query-as-sql-like-clause/69258 "2016-12-16T07:59:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanimoto](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tanimoto](https://discuss.elastic.co/u/tanimoto)\
**Post date:** [December 16, 2016, 7:59am UTC](https://discuss.elastic.co/t/what-is-equivalent-query-as-sql-like-clause/69258/1 "2016-12-16T07:59:40Z")

</div>

I'm comparing ES search results with SQL.  
ES version is 2.4.2.

Is there exactly same query with SQL LIKE clause?

I use wildcatd with \* but it returns lots of similar words, not only exact partial match.

I'm using it in Japanese.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 16, 2016, 8:28am UTC](https://discuss.elastic.co/t/what-is-equivalent-query-as-sql-like-clause/69258/2 "2016-12-16T08:28:46Z")

</div>

You need to understand first how elasticsearch is working behind the scene.  
I'd encourage you reading [https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping-analysis.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping-analysis.html)

Then, don't use wildcard unless you really have a use case for it.  
Use match queries and provide the right analyzer for your use case.

---

<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:** [January 13, 2017, 8:28am UTC](https://discuss.elastic.co/t/what-is-equivalent-query-as-sql-like-clause/69258/3 "2017-01-13T08:28:45Z")

</div>

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