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

Update include+exclude syntax for Terms/Significant terms aggs #129

Closed
ycombinator opened this issue Apr 13, 2016 · 2 comments
Closed

Update include+exclude syntax for Terms/Significant terms aggs #129

ycombinator opened this issue Apr 13, 2016 · 2 comments
Labels

Comments

@ycombinator
Copy link
Contributor

The syntax for include and exclude has changed for terms and significant_terms aggregations in Elasticsearch 2.0. In Elasticsearch 1.x, it was possible to have a terms/significant_terms aggregation request that looked like this:

  "significant_terms": {
    "field": "machine.os.raw",
    "size": 10,
    "include": {
      "pattern": ".*sport.*", 
      "flags": "CASE_INSENSITIVE"
    }
  }

Starting with Elasticsearch 2.0, this is no longer allowed. Specifically, it is not possible to specify flags anymore. The new syntax looks like this:

  "significant_terms": {
    "field": "machine.os.raw",
    "size": 10,
    "include": ".*sport.*"
  }

References:

Observed

Sense (with Elasticsearch 2.x) will autocomplete to the 1.x syntax.

Expected

Sense (with Elasticsearch 2.x) should autocomplete to the 2.x syntax.

@skearns64
Copy link

Also note that more changes may be coming for 5.0: elastic/elasticsearch#17705

@ycombinator
Copy link
Contributor Author

Thanks @skearns64. Now that Sense has moved into the Kibana repo as Console starting with 5.0, I'm tracking any ES 5.0 impacts on Console here: elastic/kibana#6879

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

No branches or pull requests

2 participants