Sure. According to the docs [1], the available expressions for
date_histogram interval are year, quarter, month, week, day, hour, minute,
second. But what if you want to rollup by another interval that's not
supported, like decade or millisecond? I was just wondering if there was
maybe a way to write a plugin for such custom intervals.
Specifically, I need a CDC MMWR week [2] interval, which is similar to ISO
week (which I assume is what elasticsearch uses), but not exactly the same.
Sure. According to the docs [1], the available expressions for
date_histogram interval are year, quarter, month, week, day, hour, minute,
second. But what if you want to rollup by another interval that's not
supported, like decade or millisecond? I was just wondering if there was
maybe a way to write a plugin for such custom intervals.
Specifically, I need a CDC MMWR week [2] interval, which is similar to ISO
week (which I assume is what elasticsearch uses), but not exactly the same.
Obviously, you can always use a regular histogram, but then the client
would have to manage all the complexities that come with dealing with time.
--
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 elasticsearc...@googlegroups.com.
That solves the decade or millisecond problem, but wouldn't work for
something like "MMWR week" or "fiscal year" which are more complex. Here's
the CDC's definition of MMWR week to illustrate my point:
The first day of any MMWR week is Sunday. MMWR week numbering is sequential
beginning with 1 and
incrementing with each week to a maximum of 52 or 53. MMWR week #1 of an
MMWR year is the first week of
the year that has at least four days in the calendar year. For example, if
January 1 occurs on a Sunday, Monday,
Tuesday or Wednesday, the calendar week that includes January 1 would be
MMWR week #1. If January 1
occurs on a Thursday, Friday, or Saturday, the calendar week that includes
January 1 would be the last MMWR
week of the previous year (#52 or #53). Because of this rule, December 29,
30, and 31 could potentially fall into
MMWR week #1 of the following MMWR year.
On Tuesday, July 8, 2014 5:29:54 PM UTC-4, vineeth mohan wrote:
On Wed, Jul 9, 2014 at 2:49 AM, Gabe Gorelick-Feldman <gabego...@gmail.com
<javascript:>> wrote:
Sure. According to the docs [1], the available expressions for
date_histogram interval are year, quarter, month, week, day, hour, minute,
second. But what if you want to rollup by another interval that's not
supported, like decade or millisecond? I was just wondering if there was
maybe a way to write a plugin for such custom intervals.
Specifically, I need a CDC MMWR week [2] interval, which is similar to
ISO week (which I assume is what elasticsearch uses), but not exactly the
same.
Obviously, you can always use a regular histogram, but then the client
would have to manage all the complexities that come with dealing with time.
--
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 elasticsearc...@googlegroups.com.
That solves the decade or millisecond problem, but wouldn't work for
something like "MMWR week" or "fiscal year" which are more complex. Here's
the CDC's definition of MMWR week to illustrate my point:
The first day of any MMWR week is Sunday. MMWR week numbering is
sequential beginning with 1 and
incrementing with each week to a maximum of 52 or 53. MMWR week #1 of an
MMWR year is the first week of
the year that has at least four days in the calendar year. For example,
if January 1 occurs on a Sunday, Monday,
Tuesday or Wednesday, the calendar week that includes January 1 would be
MMWR week #1. If January 1
occurs on a Thursday, Friday, or Saturday, the calendar week that
includes January 1 would be the last MMWR
week of the previous year (#52 or #53). Because of this rule, December
29, 30, and 31 could potentially fall into
MMWR week #1 of the following MMWR year.
On Tuesday, July 8, 2014 5:29:54 PM UTC-4, vineeth mohan wrote:
On Wed, Jul 9, 2014 at 2:49 AM, Gabe Gorelick-Feldman < gabego...@gmail.com> wrote:
Sure. According to the docs [1], the available expressions for
date_histogram interval are year, quarter, month, week, day, hour, minute,
second. But what if you want to rollup by another interval that's not
supported, like decade or millisecond? I was just wondering if there was
maybe a way to write a plugin for such custom intervals.
Specifically, I need a CDC MMWR week [2] interval, which is similar to
ISO week (which I assume is what elasticsearch uses), but not exactly the
same.
Obviously, you can always use a regular histogram, but then the client
would have to manage all the complexities that come with dealing with time.
--
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 elasticsearc...@googlegroups.com.
Thanks, I might do that. Just wanted to make sure there wasn't some easy
way to have an "interval script"
On Tuesday, July 8, 2014 5:53:39 PM UTC-4, vineeth mohan wrote:
Hello Gabe ,
Th only thing , I can think of would be to store the fiscal year date as a
separate field while indexing.
And then do all manipulation on this date.
Thanks
Vineeth
On Wed, Jul 9, 2014 at 3:10 AM, Gabe Gorelick-Feldman <gabego...@gmail.com
<javascript:>> wrote:
That solves the decade or millisecond problem, but wouldn't work for
something like "MMWR week" or "fiscal year" which are more complex. Here's
the CDC's definition of MMWR week to illustrate my point:
The first day of any MMWR week is Sunday. MMWR week numbering is
sequential beginning with 1 and
incrementing with each week to a maximum of 52 or 53. MMWR week #1 of an
MMWR year is the first week of
the year that has at least four days in the calendar year. For example,
if January 1 occurs on a Sunday, Monday,
Tuesday or Wednesday, the calendar week that includes January 1 would be
MMWR week #1. If January 1
occurs on a Thursday, Friday, or Saturday, the calendar week that
includes January 1 would be the last MMWR
week of the previous year (#52 or #53). Because of this rule, December
29, 30, and 31 could potentially fall into
MMWR week #1 of the following MMWR year.
On Tuesday, July 8, 2014 5:29:54 PM UTC-4, vineeth mohan wrote:
On Wed, Jul 9, 2014 at 2:49 AM, Gabe Gorelick-Feldman < gabego...@gmail.com> wrote:
Sure. According to the docs [1], the available expressions for
date_histogram interval are year, quarter, month, week, day, hour, minute,
second. But what if you want to rollup by another interval that's not
supported, like decade or millisecond? I was just wondering if there was
maybe a way to write a plugin for such custom intervals.
Specifically, I need a CDC MMWR week [2] interval, which is similar to
ISO week (which I assume is what elasticsearch uses), but not exactly the
same.
Obviously, you can always use a regular histogram, but then the
client would have to manage all the complexities that come with dealing
with time.
--
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 elasticsearc...@googlegroups.com.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.