Skip to content

Deprecate camelCasing #8988

@clintongormley

Description

@clintongormley

Elasticsearch allows all parameters to be passed with underscores or as camelCase (except where somebody has forgotten to handle the camelCase variant, and isn't using parseField #8964).

Also, the keys in responses can be rendered in camel case by passing ?case=camelCase, except that rendering seems inconsistent, eg:

{
   "took": 2,
   "timedOut": false,
   "Shards": {
      "total": 10,
      "successful": 10,
      "failed": 0
   },
   "hits": {
      "total": 1,
      "maxScore": 1,
      "hits": [
         {
            "Index": "t",
            "Type": "t",
            "Id": "1",
            "Score": 1,
            "_source": {
               "foo_bar": "foo bar baz"
            }
         }
      ]
   }
}

Does anybody actually use the camelCase option? Almost all of the documentation uses the underscore version of parameters, and having a single set of accepted parameters (and responses) seems less likely to cause confusion than the current situation.

I'd recommend deprecating camelcase in 2.0 and removing it in 3.0, but labelling this ticket for discussion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions