# Using multi\_match from the start of fields

**URL:** <https://discuss.elastic.co/t/using-multi-match-from-the-start-of-fields/259110>\
**Category:** Elasticsearch\
**Created:** [December 18, 2020, 1:36pm UTC](https://discuss.elastic.co/t/using-multi-match-from-the-start-of-fields/259110 "2020-12-18T13:36:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmbutler83](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmbutler83/32/81110_2.png) [@rmbutler83](https://discuss.elastic.co/u/rmbutler83)\
**Post date:** [December 18, 2020, 1:36pm UTC](https://discuss.elastic.co/t/using-multi-match-from-the-start-of-fields/259110/1 "2020-12-18T13:36:04Z")

</div>

Hi,

I'm trying to search for drug names in my datastore,

```json
{
  "index": "drugs",
  "body": {
    "size": 20,
    "query": {
      "bool": {
        "must": [
          {
            "term": {
              "RouteOfAdministration": "OR"
            }
          },
          {
            "multi_match": {
              "query": "gabapentin",
              "type": "phrase_prefix",
              "fields": [
                "ProductName",
                "DrugName",
                "GenericName"
              ],
              "minimum_should_match": 1
            }
          }
        ]
      }
    }
  }
}

```

However this returns drugs that don't belong in the search results. Is there a way I can tweak this to search from the beginning of the fields? As I suspect I'm not doing it correctly.

Thanks!

---

<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:** [January 15, 2021, 1:36pm UTC](https://discuss.elastic.co/t/using-multi-match-from-the-start-of-fields/259110/2 "2021-01-15T13:36:07Z")

</div>

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