# Elasticsearch create index api created a all uppercase field index

**URL:** <https://discuss.elastic.co/t/elasticsearch-create-index-api-created-a-all-uppercase-field-index/148410>\
**Category:** Elasticsearch\
**Created:** [September 13, 2018, 5:19am UTC](https://discuss.elastic.co/t/elasticsearch-create-index-api-created-a-all-uppercase-field-index/148410 "2018-09-13T05:19:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![memery\_xmb](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@memery\_xmb](https://discuss.elastic.co/u/memery_xmb)\
**Post date:** [September 13, 2018, 5:19am UTC](https://discuss.elastic.co/t/elasticsearch-create-index-api-created-a-all-uppercase-field-index/148410/1 "2018-09-13T05:19:10Z")

</div>

I'm working with elasticsearch 6.2.4 and using the following code to create an index.

> CreateIndexRequest request = new CreateIndexRequest(indexName);  
> request.source(jsonSource, XContentType.JSON);  
> CreateIndexResponse cir = esClient.indices().create(request);

The json is something like this

> ```
> > {
> > "mappings": {
> > "info": {
> > "properties": {
> > "id": {
> > "analyzer": "ik_smart",
> > "type": "text"
> > },
> > "sex": {
> > "analyzer": "ik_smart",
> > "type": "text"
> > },
> > "name": {
> > "analyzer": "ik_smart",
> > "type": "text"
> > }
> > }
> > }
> > }
> > }
> 
> ```

It creates the index and gives me all uppercase field .

```
"mappings": {
      "info": {
        "properties": {
           "ID": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "SEX": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "NAME": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "id": {
            "type": "text",
            "analyzer": "ik_smart"
          },
          "sex": {
            "type": "text",
            "analyzer": "ik_smart"
          },
          "name": {
            "type": "text",
            "analyzer": "ik_smart"
          }
}

```

Why would this happen and Can you guys offer me a solution?

---

<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:** [September 13, 2018, 5:32am UTC](https://discuss.elastic.co/t/elasticsearch-create-index-api-created-a-all-uppercase-field-index/148410/2 "2018-09-13T05:32:43Z")

</div>

Look at the content you sent when you indexed documents. You are probably using uppercase.

---

<div class="post-metadata">

**Author:** ![memery\_xmb](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@memery\_xmb](https://discuss.elastic.co/u/memery_xmb)\
**Post date:** [September 13, 2018, 5:42am UTC](https://discuss.elastic.co/t/elasticsearch-create-index-api-created-a-all-uppercase-field-index/148410/3 "2018-09-13T05:42:52Z")

</div>

Thanks,my mistake to get this happen.

---

<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:** [October 11, 2018, 5:42am UTC](https://discuss.elastic.co/t/elasticsearch-create-index-api-created-a-all-uppercase-field-index/148410/4 "2018-10-11T05:42:53Z")

</div>

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