# Wildcard query

**URL:** <https://discuss.elastic.co/t/wildcard-query/116230>\
**Category:** Elasticsearch\
**Created:** [January 19, 2018, 12:30pm UTC](https://discuss.elastic.co/t/wildcard-query/116230 "2018-01-19T12:30:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frances\_Buontempo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frances_buontempo/32/16050_2.png) [@Frances\_Buontempo](https://discuss.elastic.co/u/Frances_Buontempo)\
**Post date:** [January 19, 2018, 12:30pm UTC](https://discuss.elastic.co/t/wildcard-query/116230/1 "2018-01-19T12:30:45Z")

</div>

I'm trying a wildcard query to match ip addresses.  
I have two src\_ip documents of starting "5."

This query:

```auto
  "query" : {
      "wildcard" : { "src_ip" : "5*"}
  }

```

returns one hit.

What am I doing wrong?

---

<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:** [January 19, 2018, 1:03pm UTC](https://discuss.elastic.co/t/wildcard-query/116230/2 "2018-01-19T13:03:14Z")

</div>

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.

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```
````

---

<div class="post-metadata">

**Author:** ![Frances\_Buontempo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frances_buontempo/32/16050_2.png) [@Frances\_Buontempo](https://discuss.elastic.co/u/Frances_Buontempo)\
**Post date:** [January 19, 2018, 2:17pm UTC](https://discuss.elastic.co/t/wildcard-query/116230/3 "2018-01-19T14:17:47Z")

</div>

I can't reproduce this with a small example - and now it is working. No idea what I did. Sorry for noise.

---

<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:** [February 16, 2018, 2:32pm UTC](https://discuss.elastic.co/t/wildcard-query/116230/4 "2018-02-16T14:32:57Z")

</div>

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