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

Moving_avg model parser is too strict (should coerce numerics) #11487

Closed
polyfractal opened this issue Jun 4, 2015 · 0 comments
Closed

Moving_avg model parser is too strict (should coerce numerics) #11487

polyfractal opened this issue Jun 4, 2015 · 0 comments

Comments

@polyfractal
Copy link
Contributor

The settings parser for moving_avg models is too strict, and will throw an exception if it encounters a non-double (including coercible numerics). Should be changed to accept any numeric.

E.g.

"movavg": {
  "moving_avg": {
    "buckets_path": "avg",
    "window": 12,
    "model": "holt_winters",
    "settings": {
      "alpha": 0.4992721,
      "beta": 0.1366293,
      "gamma": 1,
      "period": 4
    }
  }
}
{
  "error": {
    "root_cause": [
      {
        "type": "search_parse_exception",
        "reason": "Parameter [gamma] must be a double, type `Integer` provided instead"
      }
    ],
...
}
@polyfractal polyfractal self-assigned this Jun 4, 2015
polyfractal added a commit to polyfractal/elasticsearch that referenced this issue Jun 19, 2015
…just doubles

Also changes the models to throw ParseExceptions instead of SearchParseExceptions, so that
the validation can be unit-tested.

Fixes elastic#11487
rjernst pushed a commit to rjernst/elasticsearch that referenced this issue Jun 19, 2015
…just doubles

Also changes the models to throw ParseExceptions instead of SearchParseExceptions, so that
the validation can be unit-tested.

Fixes elastic#11487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant