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

Removes typed endpoint from search and related APIs #41640

Merged
merged 2 commits into from
May 9, 2019
Merged

Removes typed endpoint from search and related APIs #41640

merged 2 commits into from
May 9, 2019

Conversation

colings86
Copy link
Contributor

No description provided.

@colings86 colings86 added >breaking :Search/Search Search-related issues that do not fall into other categories v8.0.0 labels Apr 29, 2019
@colings86 colings86 self-assigned this Apr 29, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@jpountz jpountz mentioned this pull request Apr 29, 2019
66 tasks
@colings86 colings86 marked this pull request as ready for review April 30, 2019 07:03
@colings86 colings86 requested a review from jpountz April 30, 2019 07:03
@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

1 similar comment
@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/1

@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just filling in on types-related reviews as @jpountz is out. It is great to see +72 -1,104 lines!

I left one comment on the code and had a couple thoughts:

  • Since we're removing support for the typed endpoints, using types in certain Java HLRC calls will now result in failures. Are we planning to remove types in HLRC requests/ request conversion code in a future PR, or would it make sense to also cover it here to avoid an 'in-between' state?
  • There are a few more search-related areas where types have been deprecated, such as searches on the _type field and the use of types in 'lookup' queries like terms lookup and percolator. If this PR is already getting fairly large, perhaps we could just make sure to track them on the meta-issue.

==== Removal of types

The `/{index}/{type}/_delete_by_query` and `/{index}/{type}/_update_by_query` REST endpoints have been removed in favour of `/{index}/_delete_by_query` and `/{index}/_update_by_query`. Since indexes can now only contain a single unnamed type these typed endpoints are obselete.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the phrasing 'indexes can now only contain a single unnamed type' could be confusing. We now provide 'typeless' index creation APIs, which to users seem like they don't introduce a type at all. Perhaps we could just say 'Since indexes no longer contain types, these typed endpoints are obsolete.'

Also small typo: obselete -> obsolete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ good catch, I think your wording is much better. I'll change it in this and the other PR

@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@colings86
Copy link
Contributor Author

Thanks for the review @jtibshirani

Since we're removing support for the typed endpoints, using types in certain Java HLRC calls will now result in failures. Are we planning to remove types in HLRC requests/ request conversion code in a future PR, or would it make sense to also cover it here to avoid an 'in-between' state?

I had a look at doing this but unless I'm mistaken SearchRequest is one of the remaining classes shared between the HLRC and the server code? So removing types from the SearchRequest very quickly gets into removing types from the search execution in general which is a bigger fix that IMO is suited to solving in its own PR. I added a MUST to #41059 to remove types from the Search Request and I'm happy to tackle this one straight after this PR is merged to avoid the "in between" state being around for very long which I think is ok since the "in between" state will only exist on master so there is a low risk of releasing in this state. Does this sound ok to you or do you think we really need to tackle these together?

There are a few more search-related areas where types have been deprecated, such as searches on the _type field and the use of types in 'lookup' queries like terms lookup and percolator. If this PR is already getting fairly large, perhaps we could just make sure to track them on the meta-issue.

I've added a check-box for this in #41059. I would like to handle this in a separate change to avoid this PR becoming too big

@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/1

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to tackle this one straight after this PR is merged to avoid the "in between" state being around for very long

Tackling it in the next PR sounds good to me, thanks! I agree there's not a perfect split into PRs because we share the server and HLRC classes in some places.

[float]
==== Removal of types

The `/{index}/{type}/_search`, `/{index}/{type}/_msearch`, `/{index}/{type}/_search/template` and `/{index}/{type}/_msearch/template` REST endpoints have been removed in favour of `/{index}/_search`, `/{index}/_msearch`, `/{index}/_search/template` and `/{index}/_msearch/template`, since indexes no longer contain types, these typed endpoints are obsolete..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental double period here (and below).

@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/docbldesx

@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/1

@colings86
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-sample

@colings86 colings86 merged commit 3647d7c into elastic:master May 9, 2019
@colings86 colings86 deleted the types-removal/search-url branch May 9, 2019 13:41
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
@pgomulka pgomulka mentioned this pull request Mar 25, 2020
66 tasks
pgomulka added a commit that referenced this pull request Jul 14, 2020
…PIs (#54572)

This adds a compatible APIs for typed endpoints removed in #41640

202 failing tests
These 2 tests are explicitly fixed by this PR
CompatRestIT. test {yaml=mtermvectors/21_deprecated_with_types/Deprecated camel case and _ parameters should fail in Term Vectors query}
CompatRestIT. test {yaml=mtermvectors/30_mix_typeless_typeful/mtermvectors without types on an index that has types}

I think more yml tests should be added to 7.x to cover these endpoints

17th june
1306tests | 197failures | 16ignored | 10m56.91sduration
pgomulka added a commit that referenced this pull request May 12, 2021
…ints (#72155)

Implements a V7 compatible typed endpoints for REST for search related apis
retrofits the REST layer change removed in #41640

relates main meta issue #51816
relates types removal issue #54160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking :Search/Search Search-related issues that do not fall into other categories v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants