# How can I solve Root mapping definition has unsupported parameters by using nested property for created elasticsearch index?

**URL:** https://discuss.elastic.co/t/how-can-i-solve-root-mapping-definition-has-unsupported-parameters-by-using-nested-property-for-created-elasticsearch-index/218200
**Category:** Elasticsearch
**Created:** [February 6, 2020, 2:48pm UTC](https://discuss.elastic.co/t/how-can-i-solve-root-mapping-definition-has-unsupported-parameters-by-using-nested-property-for-created-elasticsearch-index/218200 "2020-02-06T14:48:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Yusuf\_Karatoprak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yusuf_karatoprak/32/44539_2.png) [@Yusuf\_Karatoprak](https://discuss.elastic.co/u/Yusuf_Karatoprak)
#### Post date: [February 6, 2020, 2:48pm UTC](https://discuss.elastic.co/t/how-can-i-solve-root-mapping-definition-has-unsupported-parameters-by-using-nested-property-for-created-elasticsearch-index/218200/1 "2020-02-06T14:48:26Z")

</div>

How can I create a mapping structure by using nested property for created index? I got an error below. This url produces below result:  
[http://xxx:9200/usereventsreduced-2020/event/\_search?pretty=true](http://xxx:9200/usereventsreduced-2020/event/_search?pretty=true)

UrlQueryString is a nested one! we need describe it is nested.

```auto
{
  "took": 42,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 7108,
    "max_score": 7.4923043,
    "hits": [
      {
        "_index": "usereventsreduced-2020",
        "_type": "event",
        "_id": "omHM3G8BiazbIYmiMj35",
        "_score": 7.4923043,
        "_source": {
          "UserId": "",
          "SessionId": "",
          "LogLevel": "Error",
          "CorrelationId": "d49ad78d-1f38-4fed-ae47-9d6768402212",
          "UrlMethod": "GET",
          "Data": "",
          "UrlQueryString": {
            "smId": "df178847-c8e2-4434-b779-eeb248b9bebb"
          },
          "UrlPath": "/PaymentResultCommon",
          "LogSource": "B2EUi",
          "LogDate": "2020-01-25T13:01:14.4634937Z",
          "Environment": "Production-K8S"
        }
      },
      {
        "_index": "usereventsreduced-2020",
        "_type": "event",
        "_id": "1V9W3G8BiazbIYmi4uwD",
        "_score": 7.4923043,
        "_source": {
          "UserId": "",
          "SessionId": "",
          "LogLevel": "Error",
          "CorrelationId": "959d767d-cd66-4878-a5ca-e8e887aeec95",
          "UrlMethod": "GET",
          "Data": "",
          "UrlQueryString": {
            "b": "ce5cb7ed-280d-419a-9906-25004b799750",
            "t": "e05879ec-668b-41dc-9b77-09072ab62ef4"
          },
          "UrlPath": "/PaymentCallBack",
          "LogSource": "B2EUi",
          "LogDate": "2020-01-25T10:53:39.2500748Z",
          "Environment": "Production-K8S"
        }
      },
      {
        "_index": "usereventsreduced-2020",
        "_type": "event",
        "_id": "_YDh528BiazbIYmiU_nH",
        "_score": 7.4923043,
        "_source": {
          "UserId": "",
          "SessionId": "",
          "LogLevel": "Error",
          "CorrelationId": "6417519f-6f61-496d-8eba-3dd32b5c1ddf",
          "UrlMethod": "GET",
          "Data": "",
          "UrlQueryString": {
            "b": "eef54432-df76-40f4-9a7b-aa447b20eb27",
            "t": "97d3734c-203f-48a4-ac9f-77d575528121"
          },
          "UrlPath": "/PaymentCallBack",
          "LogSource": "B2EUi",
          "LogDate": "2020-01-27T16:40:51.0060448Z",
          "Environment": "Production-K8S"
        }
      }
    ]
  }
}

```

But below code doesn't work because I have to describe my paping with nested object. UrlQueryString is a nested one.

```auto
{
    "query": {
        "nested" : {
            "path" : "UrlQueryString",
            "query" : {
                "bool" : {
                    "must" : [
                    { "match" : {"UrlQueryString.parameter" : "grand-urfa-hotel"} }
                    ]
                }
            }
        }
    }
}

```

My Mapping code :

```auto
PUT /usereventsreduced-*/_mapping/event
{
    "mappings" : {
        "properties" : {
            "UrlQueryString" : {
                "type" : "nested"
            }
        }
    }
}

```

Result:

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "Root mapping definition has unsupported parameters: [mappings : {properties={UrlQueryString={type=nested}}}]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Root mapping definition has unsupported parameters: [mappings : {properties={UrlQueryString={type=nested}}}]"
  },
  "status": 400
}

```

---

<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 5, 2020, 2:48pm UTC](https://discuss.elastic.co/t/how-can-i-solve-root-mapping-definition-has-unsupported-parameters-by-using-nested-property-for-created-elasticsearch-index/218200/2 "2020-03-05T14:48:28Z")

</div>

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