Skip to content

Conversation

@javanna
Copy link
Member

@javanna javanna commented Nov 22, 2016

The type parameter has always been accepted by the search_shards api, probably to make the api and its urls the same as search. Truth is that the type never had any effect, it's been ignored from day one while accepting it may make users think that we actually do something with it.

This commit deprecate support for the type parameter from the REST layer and removes it from the Java API. Backwards compatibility is maintained on the transport layer though.

The new added serialization test also uncovered a bug in the java API where the ClusterSearchShardsRequest could be created with no arguments, but the indices were required to be not null otherwise the request couldn't be serialized as writeTo would throw NPE. Fixed by setting a default value (empty array) for indices.

Relates to #21688

The `type` parameter has always been accepted by the search_shards api, probably to make the api and its urls the same as search. Truth is that the type never had any effect, it's been ignored from day one while accepting it may make users think that we actually do something with it.

This commit deprecate support for the type parameter from the REST layer and removes it from the Java API. Backwards compatibility is maintained on the transport layer though.

The new added serialization test also uncovered a bug in the java API where the `ClusterSearchShardsRequest` could be created with no arguments, but the indices were required to be not null otherwise the request couldn't be serialized as `writeTo` would throw NPE. Fixed by setting a default value (empty array) for indices.

Relates to elastic#21688
@javanna javanna added :Search/Search Search-related issues that do not fall into other categories >deprecation review v5.1.1 labels Nov 22, 2016
@javanna
Copy link
Member Author

javanna commented Nov 22, 2016

@jpountz can you have a look please?

@javanna javanna merged commit 5c0201b into elastic:5.x Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>deprecation :Search/Search Search-related issues that do not fall into other categories v5.1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants