Exploring Your Data 探索你的数据:
样本数据集:
现在我们已经了解了基本的知识,让我们尝试研究一个更现实的数据集.
我们已经准备好了一个虚构的 客户银行账户信息的JSON文档,每个文档有下面的模式:
{
"account_number": 0,
"balance": 16623,
"firstname": "Bradshaw",
"lastname": "Mckenzie",
"age": 29,
"gender": "F",
"address": "244 Columbus Place",
"employer": "Euron",
"email": "bradshawmckenzie@euron.com",
"city": "Hobucken",
"state": "CO"
}
出于好奇, 我生成这个数据从 www.json-generator.com/ 因此请忽略实际值和数据的语义因为它们是随机生成的
加载示例数据集:
你可以下载示例数据,将其解压到当前目录,并将其加载到集群中:
[elk@node01 api]$ curl 'http://192.168.137.2:9200/_cat/indices?v' | grep bank
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
105 1164 105 1164 0 0 75761 0 --:--:-- --:--:-- --:--:-- 77600
yellow open bank
curl -H "Content-Type: application/json" -XPOST 'http://192.168.137.2:9200/bank/account/_bulk?pretty&refresh' --data-binary "@accounts.json"
[elk@node01 api]$ curl 'http://192.168.137.2:9200/_cat/indices?v'
health status index pri rep docs.count docs.deleted store.size pri.store.size
green open tlcb 5 0 0 0 795b 795b
yellow open twitter 5 1 3 0 11.3kb 11.3kb
yellow open bank 5 1 1005 0 460.3kb 460.3kb