# Searching like SQl "LIKE" operator

**URL:** <https://discuss.elastic.co/t/searching-like-sql-like-operator/10216>\
**Category:** Elasticsearch\
**Created:** [January 2, 2013, 7:09pm UTC](https://discuss.elastic.co/t/searching-like-sql-like-operator/10216 "2013-01-02T19:09:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumit\_Guptaa](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Sumit\_Guptaa](https://discuss.elastic.co/u/Sumit_Guptaa)\
**Post date:** [January 2, 2013, 7:09pm UTC](https://discuss.elastic.co/t/searching-like-sql-like-operator/10216/1 "2013-01-02T19:09:45Z")

</div>

Hello all,

Can anybody tell me how we can search in ES that "LIKE" operator work in SQl.

for EX-

{"Name":"Sumit"},  
{"Name":"Sachin"}

I want to search that name which have third character is 'm' ...How we can achieve this in ES.

Thanx

Regards,  
Sumit Gupta

---

<div class="post-metadata">

**Author:** ![Raffaele\_Sena](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raffaele_sena/32/1759_2.png) [@Raffaele\_Sena](https://discuss.elastic.co/u/Raffaele_Sena)\
**Post date:** [January 2, 2013, 7:38pm UTC](https://discuss.elastic.co/t/searching-like-sql-like-operator/10216/2 "2013-01-02T19:38:37Z")

</div>

"Name:_m_" would be equivalent to "Name LIKE "%m%". Not sure of how you can  
get the "3rd character is an "m" in SQL (unless you use special regex  
expressions)

-- Raffaele

On Wed, Jan 2, 2013 at 11:09 AM, Sumit Guptaa [sumit.gupta.ngi@gmail.com](mailto:sumit.gupta.ngi@gmail.com)wrote:

> Hello all,
> 
> Can anybody tell me how we can search in ES that "LIKE" operator work in  
> SQl.
> 
> for EX-
> 
> {"Name":"Sumit"},  
> {"Name":"Sachin"}
> 
> I want to search that name which have third character is 'm' ...How we can  
> achieve this in ES.
> 
> Thanx
> 
> Regards,  
> Sumit Gupta
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Searching-like-SQl-LIKE-operator-tp4027607.html](http://elasticsearch-users.115913.n3.nabble.com/Searching-like-SQl-LIKE-operator-tp4027607.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --

--

---

<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:** [July 6, 2017, 2:58am UTC](https://discuss.elastic.co/t/searching-like-sql-like-operator/10216/3 "2017-07-06T02:58:00Z")

</div>


