Date format for minimum / maximum aggs in beta2


(Michael Sick) #1

Trying to get the min / max dates for a query. Would aggregates be the
right way to do so? Should the min / max aggs respect the "format":
"date_time" property that date histogram does? The Sense query:

GET /vitals/vital/_search
{
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"min_time" : {
"min" : {
"field" : "recorded_time",
"format": "date_time"
}
},
"max_time" : {
"max" : { "field" : "recorded_time" }
}
}
}

produces:

{
"took": 4474,
"timed_out": false,
"_shards": {
"total": 103,
"successful": 103,
"failed": 0
},
"hits": {
"total": 129870443,
"max_score": 1,
"hits": []
},
"aggregations": {
"max_time": {
"value": 1732417139462
},
"min_time": {
"value": 1386850080000
}
}
}

Which I know is a long response time - my laptop is pretty loaded up at the
moment. Gist @ https://gist.github.com/mikeasick/7964683

If this should be a bug or feature request, let me know and I'll create.
Advice much appreciated. Thanks --Mike

Michael Sick | Big Data Architect
Serene Software Inc.

--
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/CAP8axnBG6oZBLkxczR%3DPgHFmcvwHU1VrT9PM5yHAa9eodzW%2BhA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(uboness) #2

Hi Michael,

Yes, please open an official issue for it on github.

Thanks,
Uri

On Saturday, December 14, 2013 12:44:32 PM UTC-8, Michael Sick wrote:

Trying to get the min / max dates for a query. Would aggregates be the
right way to do so? Should the min / max aggs respect the "format":
"date_time" property that date histogram does? The Sense query:

GET /vitals/vital/_search
{
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"min_time" : {
"min" : {
"field" : "recorded_time",
"format": "date_time"
}
},
"max_time" : {
"max" : { "field" : "recorded_time" }
}
}
}

produces:

{
"took": 4474,
"timed_out": false,
"_shards": {
"total": 103,
"successful": 103,
"failed": 0
},
"hits": {
"total": 129870443,
"max_score": 1,
"hits": []
},
"aggregations": {
"max_time": {
"value": 1732417139462
},
"min_time": {
"value": 1386850080000
}
}
}

Which I know is a long response time - my laptop is pretty loaded up at
the moment. Gist @ https://gist.github.com/mikeasick/7964683

If this should be a bug or feature request, let me know and I'll create.
Advice much appreciated. Thanks --Mike

Michael Sick | Big Data Architect
Serene Software Inc.

--
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/f27a8402-d425-4bb3-9390-2e8b3a42cf7c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Michael Sick) #3

Done - thanks!

On Mon, Dec 16, 2013 at 10:32 AM, uboness uri.boness@elasticsearch.comwrote:

Hi Michael,

Yes, please open an official issue for it on github.

Thanks,
Uri

On Saturday, December 14, 2013 12:44:32 PM UTC-8, Michael Sick wrote:

Trying to get the min / max dates for a query. Would aggregates be the
right way to do so? Should the min / max aggs respect the "format":
"date_time" property that date histogram does? The Sense query:

GET /vitals/vital/_search
{
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"min_time" : {
"min" : {
"field" : "recorded_time",
"format": "date_time"
}
},
"max_time" : {
"max" : { "field" : "recorded_time" }
}
}
}

produces:

{
"took": 4474,
"timed_out": false,
"_shards": {
"total": 103,
"successful": 103,
"failed": 0
},
"hits": {
"total": 129870443,
"max_score": 1,
"hits": []
},
"aggregations": {
"max_time": {
"value": 1732417139462
},
"min_time": {
"value": 1386850080000
}
}
}

Which I know is a long response time - my laptop is pretty loaded up at
the moment. Gist @ https://gist.github.com/mikeasick/7964683

If this should be a bug or feature request, let me know and I'll create.
Advice much appreciated. Thanks --Mike

Michael Sick | Big Data Architect
Serene Software Inc.

--
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/f27a8402-d425-4bb3-9390-2e8b3a42cf7c%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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/CAP8axnBMHe-pRGhTfVvso8_htV3FnKP8gU0Qez9ChAdxstd31w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #4