# Implied Wildcard Search

**URL:** <https://discuss.elastic.co/t/implied-wildcard-search/364498>\
**Category:** Kibana\
**Created:** [August 6, 2024, 8:43pm UTC](https://discuss.elastic.co/t/implied-wildcard-search/364498 "2024-08-06T20:43:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [August 6, 2024, 8:43pm UTC](https://discuss.elastic.co/t/implied-wildcard-search/364498/1 "2024-08-06T20:43:21Z")

</div>

When using the search bar, I'd like to have wildcards implied. For example, I have a dataset that has URLs in the `url.full` field. I'd like to be able to enter in the search bar `url.domain: google` and it matches on any value that has google in it. Is this possible?

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [August 7, 2024, 2:54am UTC](https://discuss.elastic.co/t/implied-wildcard-search/364498/2 "2024-08-07T02:54:20Z")

</div>

You can use the 'wildcard query' in Elasticsearch ([Wildcard query | Elasticsearch Guide [8.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html)).

For example:

```auto
GET /websites/_search
{
  "query": {
    "wildcard": {
      "url.domain": "*google*"
    }
  }
}

```

This would return any document that has "google" in the `url.domain` field.

---

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [August 7, 2024, 3:47pm UTC](https://discuss.elastic.co/t/implied-wildcard-search/364498/3 "2024-08-07T15:47:38Z")

</div>

Yes, I'm aware of this as an Elasticsearch/Kibana admin/"power user". I'm talking about people who are not in IT seeing the search bar and just typing in `google` and expect to see anything that mentions `Google`, `google`, `www.google.com`, etc...

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [August 7, 2024, 7:02pm UTC](https://discuss.elastic.co/t/implied-wildcard-search/364498/4 "2024-08-07T19:02:44Z")

</div>

Are you talking about creating a web application and a search bar to accomplish this, or using the search bar from Kibana UI itself?

---

<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:** [August 7, 2024, 8:53pm UTC](https://discuss.elastic.co/t/implied-wildcard-search/364498/5 "2024-08-07T20:53:49Z")

</div>

For the example your are giving, that should work out of the box with a default `text` field.

Because the following strings are analyzed this way:

- `Google` -\> `google`
- `google` -\> `google`
- `www.google.com` -\> `www`, `google`, `com`

So searching for `google` will match the 3 terms.

It depends on the type used for `url.domain` and its analyzer if it's a `text` field.

---

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [August 8, 2024, 10:16pm UTC](https://discuss.elastic.co/t/implied-wildcard-search/364498/6 "2024-08-08T22:16:02Z")

</div>

ah, you got me on a special character. Those all do indeed work, but I also meant something like a user searching for `google` and seeing `googleapis.com` in the results as well. I'm working within the Elastic ECS schema and, currently, looking at the url.domain field and using the default analyzer on ingest and search.

Not trying to move the goal post, I just wasn't completely clear.
