# Need Help for ES query

**URL:** <https://discuss.elastic.co/t/need-help-for-es-query/141415>\
**Category:** Elasticsearch\
**Created:** [July 24, 2018, 3:10pm UTC](https://discuss.elastic.co/t/need-help-for-es-query/141415 "2018-07-24T15:10:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kalyan\_Dey](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@Kalyan\_Dey](https://discuss.elastic.co/u/Kalyan_Dey)\
**Post date:** [July 24, 2018, 3:10pm UTC](https://discuss.elastic.co/t/need-help-for-es-query/141415/1 "2018-07-24T15:10:40Z")

</div>

I want to know the respective query in elastic search for a SQl query with LIKE in where clause as follows:

1. WHERE LIKE 'brown fox%'
2. WHERE LIKE '%brown fox%'
3. WHERE LIKE '%brown fox'

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:** [July 26, 2018, 6:43am UTC](https://discuss.elastic.co/t/need-help-for-es-query/141415/2 "2018-07-26T06:43:06Z")

</div>

Hey @Kalyan_Dey,

May I suggest the [Elasticsearch SQL `translate` API](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/sql-translate.html) for this? For a certain index, you could run your `WHERE LIKE ....` query in the `translate` API and it will give you an Elasticsearch `_search` request instead. I'm not saying it will be the best fit for your mapping and query, but it will get you started with something to experiment with.

---

<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:** [August 23, 2018, 6:43am UTC](https://discuss.elastic.co/t/need-help-for-es-query/141415/3 "2018-08-23T06:43:08Z")

</div>

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