# Fuzzy Search Query using KQL or Lucene

**URL:** <https://discuss.elastic.co/t/fuzzy-search-query-using-kql-or-lucene/330575>\
**Category:** Kibana\
**Created:** [April 23, 2023, 10:24am UTC](https://discuss.elastic.co/t/fuzzy-search-query-using-kql-or-lucene/330575 "2023-04-23T10:24:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiharqa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiharqa/32/95336_2.png) [@Tiharqa](https://discuss.elastic.co/u/Tiharqa)\
**Post date:** [April 23, 2023, 10:24am UTC](https://discuss.elastic.co/t/fuzzy-search-query-using-kql-or-lucene/330575/1 "2023-04-23T10:24:27Z")

</div>

I'm trying to find documents where the `host.os.platform` field has some words similar to `host.os.name` for example I want to use Kibana discover either Lucene or KQL for that.  
This is what I came up with :

```auto
host.os.platform:*host.os.name*

```

This query uses a wildcard character `*` to match any characters before or after the value of `host.os.name` . So if `host.os.name` is "Rocky Linux", this query will match documents where `host.os.platform` contains any words that include "Rocky", such as "rocky", "rockylinux", "rocky-8", etc.

I m not getting results can any one may be advise on what I m doing wrong here.

update some thing what I came up with may it will help some one

```auto
host.name: *linux* and host.os.type: linux

```

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [April 26, 2023, 2:14pm UTC](https://discuss.elastic.co/t/fuzzy-search-query-using-kql-or-lucene/330575/2 "2023-04-26T14:14:22Z")

</div>

Hi @Tiharqa. It looks like you have figured out the solution. I would only add that `*linux*` can be a very resource intensive query because the pattern begins with the wildcard character `*` . Note the Warning in [this documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html).

---

<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:** [May 24, 2023, 2:14pm UTC](https://discuss.elastic.co/t/fuzzy-search-query-using-kql-or-lucene/330575/3 "2023-05-24T14:14:55Z")

</div>

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