Data visualization with elasticsearch aggregations and d3 explaining

Hi guys, i want to build graph using d3 and query from elassticsearch, but
anyone here tell me what exactly mean by this code ?

client.search({
index: 'nfl',
size: 5,
body: {
// Begin query.
query: {
// Boolean query for matching and excluding items.
bool: {
must: {
match: {
"description": "TOUCHDOWN"
// "season": "2012"
}
},
must_not: { match: { "qtr": 5 }}
}
},
// Aggregate on the results
aggs: {
touchdowns: {
terms: {
field: "qtr",
order: { "_term" : "asc" }
}
}
}
// End query.
}

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ed73a370-8623-4373-bfd6-16222b3b51c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You really need to go over the query documentation first, there are plenty
of good examples and tutorials that will guide you and help you understand
your snippet.

I gather you understand the query part, the aggregation part (there are
lots of docs) shows the frequency (count) of touchdowns on field "qtr".

You really need to dive into the docs :slight_smile:

On Thursday, December 4, 2014 2:00:56 AM UTC-5, Mohd Syafiq wrote:

Hi guys, i want to build graph using d3 and query from elassticsearch, but
anyone here tell me what exactly mean by this code ?

client.search({
index: 'nfl',
size: 5,
body: {
// Begin query.
query: {
// Boolean query for matching and excluding items.
bool: {
must: {
match: {
"description": "TOUCHDOWN"
// "season": "2012"
}
},
must_not: { match: { "qtr": 5 }}
}
},
// Aggregate on the results
aggs: {
touchdowns: {
terms: {
field: "qtr",
order: { "_term" : "asc" }
}
}
}
// End query.
}

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/230e182a-529e-4343-8cb6-3eb7a39f2fa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.