# How to Search word and digits

**URL:** <https://discuss.elastic.co/t/how-to-search-word-and-digits/325848>\
**Category:** Elasticsearch\
**Created:** [February 17, 2023, 1:43pm UTC](https://discuss.elastic.co/t/how-to-search-word-and-digits/325848 "2023-02-17T13:43:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohamed\_Farshath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohamed_farshath/32/117402_2.png) [@Mohamed\_Farshath](https://discuss.elastic.co/u/Mohamed_Farshath)\
**Post date:** [February 17, 2023, 1:43pm UTC](https://discuss.elastic.co/t/how-to-search-word-and-digits/325848/1 "2023-02-17T13:43:52Z")

</div>

Hey guys, I need help searching this message's contents which has a word and a code that varies from 4 to 6 digits.

examples are follows:

enter this : 4567  
enter this : 567893

---

<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:** [February 17, 2023, 2:25pm UTC](https://discuss.elastic.co/t/how-to-search-word-and-digits/325848/2 "2023-02-17T14:25:39Z")

</div>

A match query will probably work.

---

<div class="post-metadata">

**Author:** ![Mohamed\_Farshath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohamed_farshath/32/117402_2.png) [@Mohamed\_Farshath](https://discuss.elastic.co/u/Mohamed_Farshath)\
**Post date:** [February 17, 2023, 2:51pm UTC](https://discuss.elastic.co/t/how-to-search-word-and-digits/325848/3 "2023-02-17T14:51:44Z")

</div>

well do you have something in mind for try?

---

<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:** [February 17, 2023, 8:24pm UTC](https://discuss.elastic.co/t/how-to-search-word-and-digits/325848/4 "2023-02-17T20:24:39Z")

</div>

Yes. A match query.

If you need more information, could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can **copy and paste in Kibana dev console** , click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

<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:** [March 17, 2023, 8:24pm UTC](https://discuss.elastic.co/t/how-to-search-word-and-digits/325848/5 "2023-03-17T20:24:56Z")

</div>

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