# How can I retrieve 'mapping parameters' like "index", "index\_options" and "norms"?

**URL:** https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370
**Category:** Elasticsearch
**Created:** [August 14, 2018, 4:13pm UTC](https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370 "2018-08-14T16:13:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![lucademichele](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucademichele/32/34469_2.png) [@lucademichele](https://discuss.elastic.co/u/lucademichele)
#### Post date: [August 14, 2018, 4:13pm UTC](https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370/1 "2018-08-14T16:13:13Z")

</div>

Hi to all!

> I'm working on Elastic 5.4

I want to retrieve all mapping parameters (values for "index", "index\_options", "norms") currently defined for a mapped object, but i can't find the way...

Here is what I'm doing:

**1) I have defined a template**

```
curl -X PUT \
  'http://localhost:9200/_template/transactions_index_template' \
  -d '{
    "template": "transactions_index*",
    "mappings": {
        "transaction": {
            "_all": {
                "enabled": false
            },
            "properties": {
                "fieldA": {
                    "index_options": "docs",
                    "index": "not_analyzed",
                    "norms": false,
                    "type": "keyword"
                },
                "fieldB": {
                    "index_options": "docs",
                    "index": "no",
                    "norms": false,
                    "type": "keyword"
                },
                "fieldC": {
                    "index_options": "docs",
                    "index": "no",
                    "type": "long"
                }
            }
        }
    }
}'
```

**2) Than, no matter what, i have completely defined an index**

```
curl -X PUT \
      'http://localhost:9200/transactions_index_2018_06/' \
      -H 'Content-Type: application/json' \
      -d '{
    "mappings": {
        "transaction": {
            "_all": {
                "enabled": false
            },
            "properties": {
                "fieldA": {
                    "index_options": "docs",
                    "index": "not_analyzed",
                    "norms": false,
                    "type": "keyword"
                },
                "fieldB": {
                    "index_options": "docs",
                    "index": "no",
                    "norms": false,
                    "type": "keyword"
                },
                "fieldC": {
                    "index_options": "docs",
                    "index": "no",
                    "type": "long"
                }
            }
        }
    }
    }'
```

**When i get pretty info of the created index, the response lacks of the values for "index", "index\_options", "norms"**

curl -X GET   
'[http://localhost:9200/transactions\_index\_2018\_06/?pretty=](http://localhost:9200/transactions_index_2018_06/?pretty=)'

RETURNS:

```
{
    "mappings": {
        "transaction": {
            "_all": {
                "enabled": false
            },
            "properties": {
                "fieldA": {
                    "type": "keyword"
                },
                "fieldB": {
                    "type": "keyword"
                },
                "fieldC": {
                    "index_options": "docs",
                    "type": "long"
                }
            }
        }
    }
}
```

**_WHY? WHAT I HAVE TO DO?_**

---

<div class="post-metadata">

### Author: ![lucademichele](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucademichele/32/34469_2.png) [@lucademichele](https://discuss.elastic.co/u/lucademichele)
#### Post date: [August 17, 2018, 9:12am UTC](https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370/3 "2018-08-17T09:12:48Z")

</div>

up please

---

<div class="post-metadata">

### Author: ![lucademichele](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucademichele/32/34469_2.png) [@lucademichele](https://discuss.elastic.co/u/lucademichele)
#### Post date: [August 20, 2018, 7:39am UTC](https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370/4 "2018-08-20T07:39:39Z")

</div>

No ideas?... maybe someone can tell me that this has no sense... it would be a starting point 🙂

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 20, 2018, 8:32am UTC](https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370/5 "2018-08-20T08:32:06Z")

</div>

@jimczi Do you have an idea?

---

<div class="post-metadata">

### Author: ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)
#### Post date: [August 20, 2018, 10:44am UTC](https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370/6 "2018-08-20T10:44:27Z")

</div>

If you want to retrieve all mapping options you need to use the field mapping API and set `include_defaults=true`:  
`GET transactions_index_2018_06/_mapping/field/*?include_defaults=true`  
See [https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html#\_other\_options](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html#_other_options)

---

<div class="post-metadata">

### Author: ![lucademichele](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucademichele/32/34469_2.png) [@lucademichele](https://discuss.elastic.co/u/lucademichele)
#### Post date: [August 20, 2018, 10:57am UTC](https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370/7 "2018-08-20T10:57:30Z")

</div>

Thank you so much... it works!

Previously i tried with defaults this way

> [http://localhost:9200/transactions\_index\_2018\_06/\_mapping/?include\_defaults=true&pretty](http://localhost:9200/transactions_index_2018_06/_mapping/?include_defaults=true&pretty)

having no success...

Unfortunately didn't find the "/field/\*" path parameter in my searches, but now, following your suggestion (as follows)

> [http://localhost:9200/transactions\_index\_2018\_06/\_mapping/field/\*?include\_defaults=true&pretty](http://localhost:9200/transactions_index_2018_06/_mapping/field/*?include_defaults=true&pretty)

i can retrieve all the information i need

Thank you again!

---

<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: [September 17, 2018, 10:57am UTC](https://discuss.elastic.co/t/how-can-i-retrieve-mapping-parameters-like-index-index-options-and-norms/144370/8 "2018-09-17T10:57:40Z")

</div>

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