# How to boost a nested obj in multi\_match fields list

**URL:** <https://discuss.elastic.co/t/how-to-boost-a-nested-obj-in-multi-match-fields-list/105635>\
**Category:** Elasticsearch\
**Created:** [October 28, 2017, 7:30am UTC](https://discuss.elastic.co/t/how-to-boost-a-nested-obj-in-multi-match-fields-list/105635 "2017-10-28T07:30:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buntu\_Dev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/buntu_dev/32/117258_2.png) [@Buntu\_Dev](https://discuss.elastic.co/u/Buntu_Dev)\
**Post date:** [October 28, 2017, 7:30am UTC](https://discuss.elastic.co/t/how-to-boost-a-nested-obj-in-multi-match-fields-list/105635/1 "2017-10-28T07:30:11Z")

</div>

I got a nested field in the doc in this form and want to write a query applying the boosting on this field:

Previously the nested field structure was something like this:

```
...
"my_nested_obj": {
    "project-type": [
      "skill-level": [
        {
          "name": "Intermediate",
          "value": "63897"
        }
      ],
      "room": [
      {
        "name": "Outdoor",
        "value": "19246"
      }
    ]
  }.......

```

and I could apply boosting on the field like this:

```
...
"query": {
    "filtered": {
      "query": {
        "filtered": {
          "query": {
            "multi_match": {
              "query": "some query",
              "fields": [
                "title^3",
                "excerpt^2",
                "my_nested_obj.skill-level.name^3"
              ],
              "operator": "and",
              "type": "cross_fields"
            }
          },
....

```

The nested field structure reformatted and looks like this:

```
"my_nested_obj": [
        {
          "name": "Intermediate",
          "type": "skill-level",
          "value": "63897"
        },
        {
          "name": "Outdoor",
          "type": "room",
          "value": "19246"
        }
      ]....

```

How do I go about applying the boosting on the nested field and rewrite the above query?

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:** [November 25, 2017, 7:30am UTC](https://discuss.elastic.co/t/how-to-boost-a-nested-obj-in-multi-match-fields-list/105635/2 "2017-11-25T07:30:38Z")

</div>

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