A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

vjhbkbjlkl
回复 使用道具 举报
感谢分享
回复 使用道具 举报
查看全部
回复 使用道具 举报
很多实用的资料
回复 使用道具 举报
感谢分享
回复 使用道具 举报
谢谢分享
回复 使用道具 举报
# 聚合分析的原理及精准度问题
## 课程demo
```
DELETE my_flights
PUT my_flights
{
  "settings": {
    "number_of_shards": 20
  },
  "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"
        }
      }
    }
}


POST _reindex
{
  "source": {
    "index": "kibana_sample_data_flights"
  },
  "dest": {
    "index": "my_flights"
  }
}

GET kibana_sample_data_flights/_count
GET my_flights/_count

get kibana_sample_data_flights/_search


GET kibana_sample_data_flights/_search
{
  "size": 0,
  "aggs": {
    "weather": {
      "terms": {
        "field":"OriginWeather",
        "size":5,
        "show_term_doc_count_error":true
      }
    }
  }
}


GET my_flights/_search
{
  "size": 0,
  "aggs": {
    "weather": {
      "terms": {
        "field":"OriginWeather",
        "size":1,
        "shard_size":1,
        "show_term_doc_count_error":true
      }
    }
  }
}

```
## 相关阅读
回复 使用道具 举报
好好学东西
回复 使用道具 举报
谢谢你的分享,让我们省去了很多时间
回复 使用道具 举报
似懂非懂是非得失
回复 使用道具 举报
我来看看
回复 使用道具 举报
niutttttttttttttttttttttttttttt
回复 使用道具 举报
111111111111111111111111111111111
回复 使用道具 举报
1111111111111111111111111111111111111
回复 使用道具 举报
666666666666666666666666666
回复 使用道具 举报
谢谢分享
回复 使用道具 举报
Hi!福建省法发顺丰收费单 法师法师
回复 使用道具 举报
Java面试-框架篇(SSM-SpringMVC)
回复 使用道具 举报
11111111111111111111111111111111111
回复 使用道具 举报
ltgbaaaaaaaaaaaaaaaaaa
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马