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

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"';

Hi Aleksandra

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

Many thx & Best,
Matthias

Thank you very much for your answer! :slight_smile:

{
    "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"
                }
            }
        }
    }
}

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