1、建立新索引
2、指定reindex
{
"source": {
"index": "deviceinfo_es"
},
"dest": {
"index": "deviceinfo"
}
}
结果如图:
3.2G,77万条数据,耗时526324毫秒,约10分钟。
参考:
https://blog.csdn.net/laoyang360/article/details/81589459
https://blog.csdn.net/qq_32923745/article/details/80827550
注:
1、建立新索引
{
"mappings": {
"appList": {
"properties": {
"app_ver": {
"type": "string"
},
"apps": {
"properties": {
"app_label": {
"type": "string"
},
"pkg_name": {
"type": "string"
}
}
},
"biz_channel": {
"type": "string"
},
"biz_type": {
"type": "string"
},
"crawler_time": {
"type": "string"
},
"imei": {
"type": "string"
},
"queryDate": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"type": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"deviceInfo_td": {
"properties": {
"data": {
"type": "string"
},
"queryDate": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"source": {
"type": "string"
},
"type": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"deviceInfo": {
"properties": {
"addition_tool": {
"type": "string"
},
"app_ver": {
"type": "string"
},
"basestation_count": {
"type": "string"
},
"basestation_num": {
"type": "string"
},
"biz_channel": {
"type": "string"
},
"biz_type": {
"type": "string"
},
"card_nettype": {
"type": "string"
},
"client_version": {
"type": "string"
},
"crawler_time": {
"type": "string"
},
"distin_hight": {
"type": "string"
},
"distin_width": {
"type": "string"
},
"exist_simcard": {
"type": "string"
},
"exist_wifi": {
"type": "string"
},
"first_installtime": {
"type": "string"
},
"frame_atttool": {
"type": "string"
},
"gps_address": {
"type": "string"
},
"imei": {
"type": "string"
},
"imsi": {
"type": "string"
},
"imsi1": {
"type": "string"
},
"ip": {
"type": "string"
},
"is_root": {
"type": "string"
},
"last_updatetime": {
"type": "string"
},
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
},
"mem": {
"type": "string"
},
"mobile_coucode": {
"type": "string"
},
"mobile_netcode": {
"type": "string"
},
"network_type": {
"type": "string"
},
"operation_mode": {
"type": "string"
},
"os_type": {
"type": "string"
},
"phone1": {
"type": "string"
},
"phone_brand": {
"type": "string"
},
"phone_model": {
"type": "string"
},
"queryDate": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"route_mac": {
"type": "string"
},
"router_ip": {
"type": "string"
},
"router_name": {
"type": "string"
},
"serial_number": {
"type": "string"
},
"service_name": {
"type": "string"
},
"ssid": {
"type": "string"
},
"support_bluetooth": {
"type": "string"
},
"support_callup": {
"type": "string"
},
"support_mobnet": {
"type": "string"
},
"support_nfc": {
"type": "string"
},
"type": {
"type": "string"
},
"use_simulator": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"callLog": {
"properties": {
"app_ver": {
"type": "string"
},
"biz_channel": {
"type": "string"
},
"biz_type": {
"type": "string"
},
"crawler_time": {
"type": "string"
},
"imei": {
"type": "string"
},
"queryDate": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"records": {
"properties": {
"call_duration": {
"type": "long"
},
"call_time": {
"type": "string"
},
"call_type": {
"type": "string"
},
"other_num": {
"type": "string"
}
}
},
"type": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"smsList": {
"properties": {
"app_ver": {
"type": "string"
},
"biz_channel": {
"type": "string"
},
"biz_type": {
"type": "string"
},
"crawler_time": {
"type": "string"
},
"imei": {
"type": "string"
},
"queryDate": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"records": {
"properties": {
"phone": {
"type": "string"
},
"sms_time": {
"type": "string"
},
"smsbody": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"type": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"contact": {
"properties": {
"app_ver": {
"type": "string"
},
"biz_channel": {
"type": "string"
},
"biz_type": {
"type": "string"
},
"crawler_time": {
"type": "string"
},
"imei": {
"type": "string"
},
"queryDate": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"records": {
"properties": {
"home_phone": {
"type": "string"
},
"last_time_contacted": {
"type": "string"
},
"last_updated_time": {
"type": "string"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"work_phone": {
"type": "string"
}
}
},
"type": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
}
}
}