ELASTICSEARCH Aggregation(Bucket)
RDB's
Group by
. 데이터를 일정 기준으로 묶어서 결과를 도출.
Create Basketball Index
curl -XPUT localhost:9200/basketball
Mapping Basketball
wget https://raw.githubusercontent.com/minsuk-heo/BigData/master/ch04/basketball_mapping.json
curl -XPUT localhost:9200/basketball/record/_mapping -d @basketball_mapping.json
Add Basketball Documents
wget https://raw.githubusercontent.com/minsuk-heo/BigData/master/ch04/twoteam_basketball.json
curl -XPOST localhost:9200/_bulk --data-binary @twoteam_basketball.json
Term Aggs - Group by(team)
wget https://raw.githubusercontent.com/minsuk-heo/BigData/master/ch04/terms_aggs.json
curl -XGET localhost:9200/_search?pretty --data-binary @terms_aggs.json
Stats Aggs - Group by(team)
wget https://raw.githubusercontent.com/minsuk-heo/BigData/master/ch04/stats_by_team.json
curl -XGET localhost:9200/_search?pretty --data-binary @stats_by_team.json