# Match query always result in exact match not "contains" or start with

**URL:** <https://discuss.elastic.co/t/match-query-always-result-in-exact-match-not-contains-or-start-with/167742>\
**Category:** Elasticsearch\
**Created:** [February 10, 2019, 8:51am UTC](https://discuss.elastic.co/t/match-query-always-result-in-exact-match-not-contains-or-start-with/167742 "2019-02-10T08:51:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dheeraj.Kumar](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@dheeraj.Kumar](https://discuss.elastic.co/u/dheeraj.Kumar)\
**Post date:** [February 10, 2019, 8:51am UTC](https://discuss.elastic.co/t/match-query-always-result-in-exact-match-not-contains-or-start-with/167742/1 "2019-02-10T08:51:14Z")

</div>

Hi ,

i have data uploaded in elastic search as below , if try to query for "vendor" , name having this text in them, it does not yield any result. But if i give exact name then it fetches the record.  
please help

ElasticSearch ver: 6.6.0  
Kibana: 6.6.0  
OS: Windows 10 Pro

other details are as below

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/e/4e41ffef801fcb491b7696088575b47fff5744c1.png)

My code to query is as below  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f5213734d4d3c2d39a406f53704a360884854a94.png)

mapping info as below

```
{
  "mapping": {
    "vendor": {
      "properties": {
        "address": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "email": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "name": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "phone": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    }
  }
}

```

![image](https://us1.discourse-cdn.com/elastic/original/3X/4/e/4edc555f03fb151d19e8a2b16714696406d3449a.png)

mapping was created as below  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/4/94522d430cb50fa582f8feebb87fcf254c8ce109.png)  
input  
**Vendor**

---

<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 10, 2019, 8:51am UTC](https://discuss.elastic.co/t/match-query-always-result-in-exact-match-not-contains-or-start-with/167742/2 "2019-03-10T08:51:15Z")

</div>

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