Deprecate types in count and msearch.#35421
Conversation
|
Pinging @elastic/es-search-aggs |
c63f05c to
a1a3194
Compare
|
@javanna @hub-cap would you be able to take a look at this from the perspective of the Java HLRC? I know we discussed creating a new set of classes for each request/ response in #34041, but it looks like we can keep most of the APIs as they are and follow the traditional path of deprecating methods. I think it would be great to avoid additional breaks if possible, as users already have a lot to think about in 7.0 with the types removal, the Java HLRC migration, hit count tracking, etc. |
dc226ae to
dfe42a3
Compare
dfe42a3 to
971c92e
Compare
There was a problem hiding this comment.
Does this need keeping? It warns when invoking URLs of this form:
GET my_index/_search?type=my_type
There was a problem hiding this comment.
Maybe not for this PR but while we're itemising the ways clients can filter by type this currently also raises no warnings:
GET my_index/_search?q=_type:my_type
or other forms of query:
GET my_index/_search
{
"query":{
"match":{
"_type":"my_type"
}
}
}
There was a problem hiding this comment.
Thanks @markharwood! I hadn't considered query parameters at all in this PR, will fix that. I added a note about queries that use _type as a field name to #35190.
7fa516e to
8b256ff
Compare
|
@markharwood I think this is ready for another look. Also tagging @jpountz in case he would like to review. |
|
Is the plan to add |
|
No, I was planning to address the search template endpoints separately. |
hub-cap
left a comment
There was a problem hiding this comment.
I think its perfectly reasonable to do what you did here. I totally agree with your reasoning.
!!! (well, ship the HLRC piece, ill let someone else review the server side ;) )
8b256ff to
a307f58
Compare
a307f58 to
c2310b6
Compare
|
LGTM |
* master: (59 commits) SQL: Move internals from Joda to java.time (elastic#35649) Add HLRC docs for Get Lifecycle Policy (elastic#35612) Align RolloverStep's name with other step names (elastic#35655) Watcher: Use joda method to get local TZ (elastic#35608) Fix line length for org.elasticsearch.action.* files (elastic#35607) Remove use of AbstractComponent in server (elastic#35444) Deprecate types in count and msearch. (elastic#35421) Refactor an ambigious TermVectorsRequest constructor. (elastic#35614) [Scripting] Use Number as a return value for BucketAggregationScript (elastic#35653) Removes AbstractComponent from several classes (elastic#35566) [DOCS] Add beta warning to ILM pages. (elastic#35571) Deprecate types in validate query requests. (elastic#35575) Unmute BuildExamplePluginsIT Revert "AwaitsFix the RecoveryIT suite - see elastic#35597" Revert "[RCI] Check blocks while having index shard permit in TransportReplicationAction (elastic#35332)" Remove remaining line length violations for o.e.action.admin.cluster (elastic#35156) ML: Adjusing BWC version post backport to 6.6 (elastic#35605) [TEST] Replace fields in response with actual values Remove usages of CharSequence in Sets (elastic#35501) AwaitsFix the RecoveryIT suite - see elastic#35597 ...
This PR deprecates types in the count and multi-search APIs, and adds tests for types deprecation in the search API.
For each API, the following updates were made:
Rest*Action, plus tests inRest*ActionTests.*_with_types.yml).For the Java HLRC, I decided not to duplicate each request/ response class as we had discussed in #34041. Instead, this PR continues to use the transport classes, and follows the traditional path of deprecating methods. My reasoning for this choice: