# HOW TO GET THE MAPPINGS TO BE LIKE kibana\_sample\_data\_flights

**URL:** <https://discuss.elastic.co/t/how-to-get-the-mappings-to-be-like-kibana-sample-data-flights/219720>\
**Category:** Kibana\
**Created:** [February 18, 2020, 6:58am UTC](https://discuss.elastic.co/t/how-to-get-the-mappings-to-be-like-kibana-sample-data-flights/219720 "2020-02-18T06:58:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![richylyq](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@richylyq](https://discuss.elastic.co/u/richylyq)\
**Post date:** [February 18, 2020, 6:58am UTC](https://discuss.elastic.co/t/how-to-get-the-mappings-to-be-like-kibana-sample-data-flights/219720/1 "2020-02-18T06:58:19Z")

</div>

I am using the FSCrawler library by @dadoonet and it works great for the ingestion of data  
But after the ingestion, I cannot seem to use the data for any visualization. Therefore I would like to see how to get the mapping of the job to be somewhat similar with kibana\_sample\_data\_flights.

What I see for kibana\_sample\_data\_flights

```
{
  "kibana_sample_data_flights" : {
    "mappings" : {
      "properties" : {
        "AvgTicketPrice" : {
          "type" : "float"
        },
        "Cancelled" : {
          "type" : "boolean"
        },
        "Carrier" : {
          "type" : "keyword"
        },
        "Dest" : {
          "type" : "keyword"
        },
        "DestAirportID" : {
          "type" : "keyword"
        },
        "DestCityName" : {
          "type" : "keyword"
        },
        "DestCountry" : {
          "type" : "keyword"
        },
        "DestLocation" : {
          "type" : "geo_point"
        },
        "DestRegion" : {
          "type" : "keyword"
        },
        "DestWeather" : {
          "type" : "keyword"
        },
        "DistanceKilometers" : {
          "type" : "float"
        },
        "DistanceMiles" : {
          "type" : "float"
        },
        "FlightDelay" : {
          "type" : "boolean"
        },
        "FlightDelayMin" : {
          "type" : "integer"
        },
        "FlightDelayType" : {
          "type" : "keyword"
        },
        "FlightNum" : {
          "type" : "keyword"
        },
        "FlightTimeHour" : {
          "type" : "keyword"
        },
        "FlightTimeMin" : {
          "type" : "float"
        },
        "Origin" : {
          "type" : "keyword"
        },
        "OriginAirportID" : {
          "type" : "keyword"
        },
        "OriginCityName" : {
          "type" : "keyword"
        },
        "OriginCountry" : {
          "type" : "keyword"
        },
        "OriginLocation" : {
          "type" : "geo_point"
        },
        "OriginRegion" : {
          "type" : "keyword"
        },
        "OriginWeather" : {
          "type" : "keyword"
        },
        "dayOfWeek" : {
          "type" : "integer"
        },
        "timestamp" : {
          "type" : "date"
        }
      }
    }
  }
}

```

But mine is something like this

```
{
  "json" : {
    "mappings" : {
      "properties" : {
        "compatibility" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "count" : {
          "type" : "integer"
        },
        "criteria" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "diophantine" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "linear constraints" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "linear diophantine equations" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "natural numbers" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "nonstrict inequations" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "score" : {
          "type" : "float"
        },
        "strict inequations" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "systems" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "text" : {
          "type" : "text"
        },
        "the set" : {
          "properties" : {
            "count" : {
              "type" : "long"
            },
            "score" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "text" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        }
      }
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [February 18, 2020, 3:06pm UTC](https://discuss.elastic.co/t/how-to-get-the-mappings-to-be-like-kibana-sample-data-flights/219720/2 "2020-02-18T15:06:31Z")

</div>

This might be better asked in the Elasticsearch forums, but the basic answer is that your mapping reflects a different type of document. The documents for the sample data are flat, but your mapping reflects that you have objects inside the document. Kibana can handle both of these mappings.

The biggest difference is that Kibana does not visualize full-text data. You should add `keyword` mappings to use text in visualizations.

---

<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 17, 2020, 3:06pm UTC](https://discuss.elastic.co/t/how-to-get-the-mappings-to-be-like-kibana-sample-data-flights/219720/3 "2020-03-17T15:06:35Z")

</div>

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