elastic / sense

A JSON aware developer's interface to Elasticsearch. Comes with handy machinery such as syntax highlighting, autocomplete, formatting and code folding.
Other
382 stars 134 forks source link

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

Closed ycombinator closed 8 years ago

ycombinator commented 8 years ago

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:

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 commented 8 years ago

Also note that more changes may be coming for 5.0: https://github.com/elastic/elasticsearch/issues/17705

ycombinator commented 8 years ago

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: https://github.com/elastic/kibana/issues/6879