# Kibana not fetching fields of an index pattern with predefined mapping (PUT request)

**URL:** <https://discuss.elastic.co/t/kibana-not-fetching-fields-of-an-index-pattern-with-predefined-mapping-put-request/215349>\
**Category:** Kibana\
**Created:** [January 16, 2020, 4:07pm UTC](https://discuss.elastic.co/t/kibana-not-fetching-fields-of-an-index-pattern-with-predefined-mapping-put-request/215349 "2020-01-16T16:07:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlekssM](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@AlekssM](https://discuss.elastic.co/u/AlekssM)\
**Post date:** [January 16, 2020, 4:07pm UTC](https://discuss.elastic.co/t/kibana-not-fetching-fields-of-an-index-pattern-with-predefined-mapping-put-request/215349/1 "2020-01-16T16:07:39Z")

</div>

I have read the exact same question but the problem was automatically closed.

"When configuring an index pattern in Kibana, it's unable to fetch the field details of a particular index in Kibana, if I am using a predefined custom mapping when creating the index, and if i upload the data without predefined mapping it's working.

Index exists in elastic search and have set of fields.

I want to be able to create my own mapping with predefined data types for my object fields"

How do you know it's unable to fetch the field details?

- data types are unknown and no fields are visible for aggregations except te default ones \_id, \_source etc.

Are there errors in Kibana?

- no errors in Kibana

Are there errors in the Kibana log?  
-no errors in Kibana log

Was the data loaded with one of our products like Logstash or a Beat?

- No, the index and default mapping with PUT request via Kibana console and the data objects via script with 'curl -H "Content-Type: application/json" -XPOST "https://domain\_endpoint/index\_name/\_bulk" --data-binary "@example.json"';

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [January 17, 2020, 3:05pm UTC](https://discuss.elastic.co/t/kibana-not-fetching-fields-of-an-index-pattern-with-predefined-mapping-put-request/215349/2 "2020-01-17T15:05:29Z")

</div>

Hi Aleksandra

Could you share the predefined custom mapping you're using?

Many thx & Best,  
Matthias

---

<div class="post-metadata">

**Author:** ![AlekssM](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@AlekssM](https://discuss.elastic.co/u/AlekssM)\
**Post date:** [January 17, 2020, 3:24pm UTC](https://discuss.elastic.co/t/kibana-not-fetching-fields-of-an-index-pattern-with-predefined-mapping-put-request/215349/3 "2020-01-17T15:24:05Z")

</div>

Thank you very much for your answer! 🙂

```
{
    "mappings": {
        "properties": {
            "company_info": {
                "properties": {
                    "name": {
                        "type": "text"
                    },
                    "email": {
                        "type": "keyword"
                    },
                    "number_employees": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "logo": {
                        "type": "keyword"
                    }
                }
            },
            "historical_data": {
                "properties": {
                    "employees": {
                        "type": "nested",
                        "properties": {
                            "info": {
                                "type": "integer"
                            },
                            "quarter": {
                                "type": "integer"
                            },
                            "year": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "emails": {
                "properties": {
                    "general_emails": {
                        "type": "nested",
                        "properties": {
                            "email": {
                                "type": "keyword"
                            },
                            "sources": {
                                "type": "nested",
                                "properties": {
                                    "url": {
                                        "type": "keyword"
                                    },
                                    "timestamp": {
                                        "type": "date"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "web": {
                "properties": {
                    "website": {
                        "type": "keyword"
                    },
                    "domain": {
                        "type": "text"
                    },
                    "aliases": {
                        "type": "keyword"
                    },
                    "redirects_to": {
                        "type": "keyword"
                    }
                }
            },
            "location": {
                "properties": {
                    "country_iso": {
                        "type": "keyword"
                    },
                    "city": {
                        "type": "keyword"
                    },
                    "postcode": {
                        "type": "text",
                        "index_prefixes": {
                            "min_chars": 1,
                            "max_chars": 9
                        }
                    },
                    "timezone": {
                        "type": "keyword"
                    },
                    "utc_offset": {
                        "type": "keyword"
                    },
                    "latitude": {
                        "type": "keyword"
                    },
                    "longitude": {
                        "type": "keyword"
                    }
                }
            },
            "company_updated_at": {
                "type": "date"
            },
            "contact_id": {
                "type": "keyword"
            },
            "contact_info": {
                "properties": {
                    "first_name": {
                        "type": "keyword"
                    },
                    "last_name": {
                        "type": "keyword"
                    },
                    "full_name": {
                        "type": "keyword"
                    }
                }
            },
            "skill_set": {
                "properties": {
                    "general": {
                        "type": "keyword"
                    },
                    "technical": {
                        "type": "keyword"
                    }
                }
            },
            "contact_updated_at": {
                "type": "date"
            },
            "relation": {
                "type": "join",
                "relations": {
                    "company": "contact"
                }
            }
        }
    }
}
```

---

<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:** [February 14, 2020, 3:24pm UTC](https://discuss.elastic.co/t/kibana-not-fetching-fields-of-an-index-pattern-with-predefined-mapping-put-request/215349/4 "2020-02-14T15:24:06Z")

</div>

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