Skip to content

Commit

Permalink
got rid of unneccessary results in histograms
Browse files Browse the repository at this point in the history
  • Loading branch information
limotova committed Dec 13, 2016
1 parent 663cec5 commit 60bfc2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function sampleScatterPlotByYears(min_year, max_year){
})
}


function barGraphByDecades(){
client.search({
index: 'million_songs',
Expand All @@ -98,7 +99,7 @@ function barGraphByDecades(){
query: {
range: {
year: {
gte: 1920
gte: 0
}
}
},
Expand All @@ -107,7 +108,8 @@ function barGraphByDecades(){
by_year: {
histogram: {
field: "year",
interval: 10 // 10 years
interval: 10, // 10 years
min_doc_count: 1 // don't return results unless there's at least 1 thing there
},
aggs: {
avg_hotttnesss: {
Expand Down

0 comments on commit 60bfc2c

Please sign in to comment.