# Different field boost per type

**URL:** <https://discuss.elastic.co/t/different-field-boost-per-type/63823>\
**Category:** Elasticsearch\
**Created:** [October 25, 2016, 4:49am UTC](https://discuss.elastic.co/t/different-field-boost-per-type/63823 "2016-10-25T04:49:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dustin\_Martin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dustin_martin/32/12697_2.png) [@Dustin\_Martin](https://discuss.elastic.co/u/Dustin_Martin)\
**Post date:** [October 25, 2016, 4:49am UTC](https://discuss.elastic.co/t/different-field-boost-per-type/63823/1 "2016-10-25T04:49:16Z")

</div>

I have 3 document types in one index. The three document types have some overlapping fields. For instance, type1 and type2 have a 'name' field. For [type1.name](http://type1.name) I want to boost it to 6 but for [type2.name](http://type2.name) I want to boost it to 3. Is there a way to specify the boost fields by type?

For reference, here is a query similar to what I am currently using:

```
{
  query: {
    bool: {
      filter: {
        or: [
          { type: { value: 'type1' } },
          { type: { value: 'type2' } }
        ]
      },
      must: [
        {
          query_string: {
            fields: ['name^6'],
            query: 'my search string*'
          }
        }
      ]
    }
  }
}
```

---

<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:** [July 5, 2017, 10:10pm UTC](https://discuss.elastic.co/t/different-field-boost-per-type/63823/2 "2017-07-05T22:10:07Z")

</div>


