# Simple search with wildcard not working

**URL:** <https://discuss.elastic.co/t/simple-search-with-wildcard-not-working/276442>\
**Category:** Elasticsearch\
**Created:** [June 19, 2021, 9:49pm UTC](https://discuss.elastic.co/t/simple-search-with-wildcard-not-working/276442 "2021-06-19T21:49:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinoth\_G](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinoth_g/32/90230_2.png) [@Vinoth\_G](https://discuss.elastic.co/u/Vinoth_G)\
**Post date:** [June 19, 2021, 9:49pm UTC](https://discuss.elastic.co/t/simple-search-with-wildcard-not-working/276442/1 "2021-06-19T21:49:52Z")

</div>

I am new to elastic and planning to migrate my application from algolia to elastic cloud.

I created an index called products where I added this data

```auto
{
  "dname": "mysore soap",
  "price": "150",
  "some": {
    "id": "mysore sandal"
  }
}

```

When I tried search with payload

```auto
{
  "query": {
    "wildcard": {
      "some.id": {
        "value": "mys*"
      }
    }
  }
}

```

It worked.

Now, Data is

```auto
{
    "objectID": "005klrWVvNX0RwxxX78O",
    "dn": "Root Vegetables Beetroot",
    "v": {
        "Beetroot 500 g": {
            "p": 22,
            "m": 27.5,
            "o": 0,
            "a": true,
            "mq": 30,
            "g": 0,
            "v": "500"
        }
    },
    "u": [
        "https://www.bigbasket.com/media/uploads/p/s/10000046_17-fresho-beetroot.jpg"
    ],
    "mq": 30,
    "b": "Fresho",
    "a": true
}

```

and wildcard search payload is

```auto
{
  "query": {
    "wildcard": {
      "dn": {
        "value": "Root*"
      }
    }
  }
}

```

its not returning any result. I checked the index and it has this exact data.  
Please let me know what I am doing wrong here? I checked the mapping for index, and its searching field is of type text only.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 21, 2021, 1:02am UTC](https://discuss.elastic.co/t/simple-search-with-wildcard-not-working/276442/2 "2021-06-21T01:02:29Z")

</div>

You've already got a topic here - [Elastic simple query with wildcard](https://discuss.elastic.co/t/elastic-simple-query-with-wildcard/276441) - so let's continue the conversation there 🙂

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 21, 2021, 1:02am UTC](https://discuss.elastic.co/t/simple-search-with-wildcard-not-working/276442/3 "2021-06-21T01:02:31Z")

</div>


