Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregations: `size` property parsing inconsistent #6061

Closed
oswaldo opened this issue May 6, 2014 · 0 comments

Comments

Projects
None yet
3 participants
@oswaldo
Copy link

commented May 6, 2014

In aggregations, the size property must be unquoted while in other places it can be quoted (tested in 1.0.0, 1.1.0 and 1.1.1)

The following work:

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

But this doesn't:

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

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

This inconsistency is not mentioned in documentation and the error message is not very helpful, so I could only spot the problem after @HonzaKral pasted a working example on irc.

I believe at least a fix should be done so all fields behave the same, or with mandatory or with optional quotes, but no two fields with same name but different behaviour.

@jpountz jpountz closed this in c4e2f63 Nov 25, 2014

@jpountz jpountz changed the title size property parsing inconsistent Aggregations: size property parsing inconsistent Nov 25, 2014

jpountz added a commit that referenced this issue Nov 25, 2014

@jpountz jpountz added the v1.3.6 label Nov 25, 2014

@clintongormley clintongormley changed the title Aggregations: size property parsing inconsistent Aggregations: `size` property parsing inconsistent Nov 25, 2014

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.