# Histogram confusion

**URL:** <https://discuss.elastic.co/t/histogram-confusion/3054>\
**Category:** Elasticsearch\
**Created:** [June 30, 2010, 4:40am UTC](https://discuss.elastic.co/t/histogram-confusion/3054 "2010-06-30T04:40:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Harvey\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_harvey_2/32/3328_2.png) [@Andrew\_Harvey\_2](https://discuss.elastic.co/u/Andrew_Harvey_2)\
**Post date:** [June 30, 2010, 4:40am UTC](https://discuss.elastic.co/t/histogram-confusion/3054/1 "2010-06-30T04:40:48Z")

</div>

Hi there.

I'm sure this one is me just not getting it, but since this is only in master, I don't have much documentation to go on.

I've been working on putting together some stuff using histogram facets, and I've been trying to do some stuff based on what I could garner from the github issues.

This is what I've been trying:

curl localhost:9200/chatter/content/\_search -d '{  
query : {  
"match\_all" : {}  
},  
facets : {  
"histo1" : {  
"histogram" : {  
"key\_field" : "published",  
"time\_interval" : "1d"  
}  
}  
}  
}'

Now the error I get for that is this: Failed to parse [1d]]; nested: NumberFormatException[For input string: "1d"].

I'm guessing I'm going about this the wrong way, so any assistance would be most appreciated.

## Thanks, Andrew Andrew Harvey / Developer lexer m/ t/ +61 2 9019 6379 w/ [http://lexer.com.au](http://lexer.com.au) Help put an end to whaling. Visit [http://www.givewhalesavoice.com.au/](http://www.givewhalesavoice.com.au/)

Please consider the environment before printing this email  
This email transmission is confidential and intended solely for the person or organisation to whom it is addressed. If you are not the intended recipient, you must not copy, distribute or disseminate the information, or take any action in relation to it and please delete this e-mail. Any views expressed in this message are those of the individual sender, except where the send specifically states them to be the views of any organisation or employer. If you have received this message in error, do not open any attachment but please notify the sender (above). This message has been checked for all known viruses powered by McAfee.

For further information visit [http://www.mcafee.com/us/threat\_center/default.asp](http://www.mcafee.com/us/threat_center/default.asp)  
Please rely on your own virus check as no responsibility is taken by the sender for any damage rising out of any virus infection this communication may contain.

This message has been scanned for malware by Websense. [www.websense.com](http://www.websense.com)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 30, 2010, 10:01am UTC](https://discuss.elastic.co/t/histogram-confusion/3054/2 "2010-06-30T10:01:44Z")

</div>

All looks good, except for the fact that time values can parse things only  
up to hours (and even that, with capital `H` and not lowercase ones which is  
nicer). I just pushed a fix, you can do "1d", or "24h".

-shay.banon

On Wed, Jun 30, 2010 at 7:40 AM, Andrew Harvey  
[Andrew.Harvey@lexer.com.au](mailto:Andrew.Harvey@lexer.com.au)wrote:

> Hi there.
> 
> I'm sure this one is me just not getting it, but since this is only in  
> master, I don't have much documentation to go on.
> 
> I've been working on putting together some stuff using histogram facets,  
> and I've been trying to do some stuff based on what I could garner from the  
> github issues.
> 
> This is what I've been trying:
> 
> curl localhost:9200/chatter/content/\_search -d '{  
> query : {  
> "match\_all" : {}  
> },  
> facets : {  
> "histo1" : {  
> "histogram" : {  
> "key\_field" : "published",  
> "time\_interval" : "1d"  
> }  
> }  
> }  
> }'
> 
> Now the error I get for that is this: Failed to parse [1d]]; nested:  
> NumberFormatException[For input string: "1d"].
> 
> I'm guessing I'm going about this the wrong way, so any assistance would be  
> most appreciated.
> 
> ## Thanks, Andrew Andrew Harvey / Developer lexer m/ t/ +61 2 9019 6379 w/ [http://lexer.com.au](http://lexer.com.au) Help put an end to whaling. Visit [http://www.givewhalesavoice.com.au/](http://www.givewhalesavoice.com.au/)
> 
> Please consider the environment before printing this email  
> This email transmission is confidential and intended solely for the person  
> or organisation to whom it is addressed. If you are not the intended  
> recipient, you must not copy, distribute or disseminate the information, or  
> take any action in relation to it and please delete this e-mail. Any views  
> expressed in this message are those of the individual sender, except where  
> the send specifically states them to be the views of any organisation or  
> employer. If you have received this message in error, do not open any  
> attachment but please notify the sender (above). This message has been  
> checked for all known viruses powered by McAfee.
> 
> For further information visit  
> [Advanced Research Center | Trellix](http://www.mcafee.com/us/threat_center/default.asp)  
> Please rely on your own virus check as no responsibility is taken by the  
> sender for any damage rising out of any virus infection this communication  
> may contain.
> 
> This message has been scanned for malware by Websense. [www.websense.com](http://www.websense.com)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:22am UTC](https://discuss.elastic.co/t/histogram-confusion/3054/3 "2017-07-06T04:22:53Z")

</div>


