# Aggregation

**URL:** <https://discuss.elastic.co/t/aggregation/19297>\
**Category:** Elasticsearch\
**Created:** [August 14, 2014, 10:52pm UTC](https://discuss.elastic.co/t/aggregation/19297 "2014-08-14T22:52:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuheng](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@yuheng](https://discuss.elastic.co/u/yuheng)\
**Post date:** [August 14, 2014, 10:52pm UTC](https://discuss.elastic.co/t/aggregation/19297/1 "2014-08-14T22:52:15Z")

</div>

Does perl module of elasticsearch allows Aggregation syntax?

I run a few tests but it failed.

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4c023317-6ef3-42cd-9496-bda276e8c2ba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c023317-6ef3-42cd-9496-bda276e8c2ba%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![chenryn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chenryn/32/44917_2.png) [@chenryn](https://discuss.elastic.co/u/chenryn)\
**Post date:** [August 15, 2014, 2:07am UTC](https://discuss.elastic.co/t/aggregation/19297/2 "2014-08-15T02:07:15Z")

</div>

No problem:  
#!/usr/bin/perl  
use 5.010;  
use Data::Dumper;  
use Search::Elasticsearch;  
my $e = Search::Elasticsearch-\>new(  
nodes =\> [  
'10.13.57.35:9200',  
'10.13.57.36:9200'  
]  
);  
my $r = $e-\>search(  
index =\> 'logstash-2014.08.15',  
body =\> {  
aggs =\> {  
aggsname =\> {  
percentiles =\> {  
field =\> "h5\_view\_loadtime"  
}  
}  
},  
size =\> 0  
}  
);  
say for values $r-\>{'aggregations'}-\>{'aggsname'};  
在 2014年8月15日，上午6:52，Yuheng Du [yuheng.du.hust@gmail.com](mailto:yuheng.du.hust@gmail.com) 写道：

> Does perl module of elasticsearch allows Aggregation syntax?
> 
> I run a few tests but it failed.
> 
> --  
> 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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4c023317-6ef3-42cd-9496-bda276e8c2ba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c023317-6ef3-42cd-9496-bda276e8c2ba%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/FE4E6588-1BA2-4F6E-B21B-BE61618759FC%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/FE4E6588-1BA2-4F6E-B21B-BE61618759FC%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![yuheng](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@yuheng](https://discuss.elastic.co/u/yuheng)\
**Post date:** [August 15, 2014, 3:49pm UTC](https://discuss.elastic.co/t/aggregation/19297/3 "2014-08-15T15:49:29Z")

</div>

I am using:

[https://lh4.googleusercontent.com/-cJH7ZK\_Aw\_I/U-4rNlfDRwI/AAAAAAAAANA/tMq8twaPRcw/s1600/12.jpg](https://lh4.googleusercontent.com/-cJH7ZK_Aw_I/U-4rNlfDRwI/AAAAAAAAANA/tMq8twaPRcw/s1600/12.jpg)  
and I got the following errors:

[https://lh5.googleusercontent.com/-lQYfexkUZ2U/U-4rqz\_\_L8I/AAAAAAAAANI/SNisnl0duhc/s1600/34.jpg](https://lh5.googleusercontent.com/-lQYfexkUZ2U/U-4rqz__L8I/AAAAAAAAANI/SNisnl0duhc/s1600/34.jpg)

can anyone tell me what is going wrong?

Thanks!

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/13b34421-fa99-4de4-ab11-15aac1dfff65%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/13b34421-fa99-4de4-ab11-15aac1dfff65%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![chenryn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chenryn/32/44917_2.png) [@chenryn](https://discuss.elastic.co/u/chenryn)\
**Post date:** [August 15, 2014, 4:56pm UTC](https://discuss.elastic.co/t/aggregation/19297/4 "2014-08-15T16:56:06Z")

</div>

What's your `deviceId` mapping type? Make sure it's a number as using in  
percentile aggregation.

2014-08-15 23:49 GMT+08:00 Yuheng Du [yuheng.du.hust@gmail.com](mailto:yuheng.du.hust@gmail.com):

> I am using:
> 
> [https://lh4.googleusercontent.com/-cJH7ZK\_Aw\_I/U-4rNlfDRwI/AAAAAAAAANA/tMq8twaPRcw/s1600/12.jpg](https://lh4.googleusercontent.com/-cJH7ZK_Aw_I/U-4rNlfDRwI/AAAAAAAAANA/tMq8twaPRcw/s1600/12.jpg)  
> and I got the following errors:
> 
> [https://lh5.googleusercontent.com/-lQYfexkUZ2U/U-4rqz\_\_L8I/AAAAAAAAANI/SNisnl0duhc/s1600/34.jpg](https://lh5.googleusercontent.com/-lQYfexkUZ2U/U-4rqz__L8I/AAAAAAAAANI/SNisnl0duhc/s1600/34.jpg)
> 
> can anyone tell me what is going wrong?
> 
> Thanks!
> 
> --  
> 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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/13b34421-fa99-4de4-ab11-15aac1dfff65%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/13b34421-fa99-4de4-ab11-15aac1dfff65%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/13b34421-fa99-4de4-ab11-15aac1dfff65%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/13b34421-fa99-4de4-ab11-15aac1dfff65%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CABwsoohkLx1mqmpRoo7WSo6r6HVouY83dLhWwRqGh80vPQZvNg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CABwsoohkLx1mqmpRoo7WSo6r6HVouY83dLhWwRqGh80vPQZvNg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:08am UTC](https://discuss.elastic.co/t/aggregation/19297/5 "2017-07-06T01:08:14Z")

</div>


