# How to find numbers starting with 80?

**URL:** <https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273>\
**Category:** Kibana\
**Created:** [June 18, 2019, 1:55pm UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273 "2019-06-18T13:55:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gosforth](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@Gosforth](https://discuss.elastic.co/u/Gosforth)\
**Post date:** [June 18, 2019, 1:55pm UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/1 "2019-06-18T13:55:30Z")

</div>

Hi,

Kibana Discover option. I'd like to display all docs that has filed value (number) starting with 20.  
Possible to do this?  
In SQL it would be ...WHERE field1 LIKE '20%'  
How to do this in Kibana?  
Regards

---

<div class="post-metadata">

**Author:** ![Vikash\_Kumar1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikash_kumar1/32/42775_2.png) [@Vikash\_Kumar1](https://discuss.elastic.co/u/Vikash_Kumar1)\
**Post date:** [June 19, 2019, 8:12am UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/2 "2019-06-19T08:12:36Z")

</div>

You can make use of the "regexp" option. It will apply the regexp to the terms.

GET \<index\_name\>_/\_search  
{  
"query": {  
"regexp":{  
"field\_name": "20_"  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![Gosforth](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@Gosforth](https://discuss.elastic.co/u/Gosforth)\
**Post date:** [June 19, 2019, 1:32pm UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/3 "2019-06-19T13:32:05Z")

</div>

Good, thank you very much. But how to do this in Kibana menu? Query syntax is too complex for ordinary user - they use GUI.

---

<div class="post-metadata">

**Author:** ![Askia\_Mohamed\_Kadri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/askia_mohamed_kadri/32/134665_2.png) [@Askia\_Mohamed\_Kadri](https://discuss.elastic.co/u/Askia_Mohamed_Kadri)\
**Post date:** [June 19, 2019, 2:40pm UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/4 "2019-06-19T14:40:26Z")

</div>

I'm not sure but I donc think that LIKE operation is possible on number. You can use range instead. LIKE is only for text fields

---

<div class="post-metadata">

**Author:** ![Gosforth](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@Gosforth](https://discuss.elastic.co/u/Gosforth)\
**Post date:** [June 19, 2019, 6:08pm UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/5 "2019-06-19T18:08:29Z")

</div>

Thanks but looks like range will give me nothing; I'd like to find with article number starting with 80 not greater or smaller than 80. Hard to believe such basic operator does not exists in Elastic ☹

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 19, 2019, 6:35pm UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/6 "2019-06-19T18:35:13Z")

</div>

You can use a regex query, but that requires the field to be mapped as keyword, not a number.

---

<div class="post-metadata">

**Author:** ![Gosforth](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@Gosforth](https://discuss.elastic.co/u/Gosforth)\
**Post date:** [June 19, 2019, 7:59pm UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/7 "2019-06-19T19:59:56Z")

</div>

Thanks. Maybe you can add this to the wishlist? Looks like basic function....

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 20, 2019, 3:23am UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/8 "2019-06-20T03:23:48Z")

</div>

If it is not a field you will be doing mathematical operations on, e.g. a phone number or a numeric article id, you should send it as a string and map it as keyword.

---

<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 18, 2019, 3:24am UTC](https://discuss.elastic.co/t/how-to-find-numbers-starting-with-80/186273/9 "2019-07-18T03:24:00Z")

</div>

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