Does aggregations size property work?

Hello all,

I've tested with versions 1.0.0, 1.1.0 and 1.1.1 and the size property
doesn't seam to work.

The following works using facets:
{
"size": "0",
"facets": {
"facettest": {
"terms": {
"field": "somefield",
"size": "5"
}
}
}
}

The response contains 5 terms as expected, but changing to aggregations:

{
"size": "0",
"aggs": {
"aggtest": {
"terms": {
"field": "somefield",
"size": "5"
}
}
}
}

Return an 400 error message ending with "Parse Failure [Unknown key for a
VALUE_STRING in [aggtest]: [size].]]; }]".

Is there any special requirement or configuration for this to work? The
documentation talks about this property since some time in
http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-aggregations-bucket-terms-aggregation.html#_size_amp_shard_size
but doesn't actually show an usage example.

Cheers,
Oswaldo

--
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/126c98a7-9d6e-4709-b6d9-8fe11e0c3b5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Solved.

Over the irc channel the user @honzakral showed me a working example he had
and I noticed that for aggregations, the size property cannot be quoted.

On the line of the previous examples, this works:

{
"size": "1",
"aggs": {
"tags": {
"terms": {
"field": "usrIdHost",
"size": 1
}
}
}
}

Opened a ticket so this inconsistency can be checked:

On Tuesday, May 6, 2014 1:34:10 PM UTC+2, Oswaldo Dantas wrote:

Hello all,

I've tested with versions 1.0.0, 1.1.0 and 1.1.1 and the size property
doesn't seam to work.

The following works using facets:
{
"size": "0",
"facets": {
"facettest": {
"terms": {
"field": "somefield",
"size": "5"
}
}
}
}

The response contains 5 terms as expected, but changing to aggregations:

{
"size": "0",
"aggs": {
"aggtest": {
"terms": {
"field": "somefield",
"size": "5"
}
}
}
}

Return an 400 error message ending with "Parse Failure [Unknown key for a
VALUE_STRING in [aggtest]: [size].]]; }]".

Is there any special requirement or configuration for this to work? The
documentation talks about this property since some time in
Elasticsearch Platform — Find real-time answers at scale | Elastic doesn't actually show an usage example.

Cheers,
Oswaldo

--
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/2b2d5945-eedc-4444-904c-fcf77e756459%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Solved.

Over the irc channel the user @honzakral showed me a working example he had
and I noticed that for aggregations, the size property cannot be quoted.

On the line of the previous examples, this works:

{
"size": "5",
"aggs": {
"aggtest": {
"terms": {
"field": "somefield",
"size": 5
}
}
}
}

On Tuesday, May 6, 2014 1:34:10 PM UTC+2, Oswaldo Dantas wrote:

Hello all,

I've tested with versions 1.0.0, 1.1.0 and 1.1.1 and the size property
doesn't seam to work.

The following works using facets:
{
"size": "0",
"facets": {
"facettest": {
"terms": {
"field": "somefield",
"size": "5"
}
}
}
}

The response contains 5 terms as expected, but changing to aggregations:

{
"size": "0",
"aggs": {
"aggtest": {
"terms": {
"field": "somefield",
"size": "5"
}
}
}
}

Return an 400 error message ending with "Parse Failure [Unknown key for a
VALUE_STRING in [aggtest]: [size].]]; }]".

Is there any special requirement or configuration for this to work? The
documentation talks about this property since some time in
Elasticsearch Platform — Find real-time answers at scale | Elastic doesn't actually show an usage example.

Cheers,
Oswaldo

--
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/99de6f9d-139f-496f-aa63-ff5be5aaeb39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.