-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Replace delimited_payload_filter by delimited_payload #26625
Replace delimited_payload_filter by delimited_payload #26625
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
6ddd158
to
7704d34
Compare
@cbuescher Thanks for your attention! Yes, my mistake. I rebased the pr, please review and test. Thanks a lot! 👍 |
@elasticmachine test this please |
@@ -191,10 +193,15 @@ | |||
input -> new CommonGramsFilter(input, CharArraySet.EMPTY_SET))); | |||
filters.add(PreConfiguredTokenFilter.singleton("czech_stem", false, CzechStemFilter::new)); | |||
filters.add(PreConfiguredTokenFilter.singleton("decimal_digit", true, DecimalDigitFilter::new)); | |||
// TODO deprecate delimited_payload_filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the deprecation also needs to happen in this PR. Using the old name, either in the settings when creating an index or when using it in an already existing index should trigger a deprecation warning and an entry in the logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed 7e7c54d
@cbuescher Thanks for your help! Could you guide me where to add that log? Thanks in advance! |
@liketic I have to admit I'm not entirely sure where the best place would be to add that kind deprecation logging. I would need to do some digging as well, but one idea to look at might be the AnalysisRegistry itself, where I think all calls to obtain an instance of a named token filter need to go though "getTokenFilterProvider()". Not sure if this is the most elegant place to put the deprecation though. |
@cbuescher Thanks! I'm trying to add deprecation log in |
I think a better way to do this would be to register |
@jpountz I tried to add a wrapper class. I'm not sure it's correct. Could you please review it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a comment about naming but things look good to me otherwise.
import org.elasticsearch.env.Environment; | ||
import org.elasticsearch.index.IndexSettings; | ||
|
||
public class DelimitedPayloadTokenFilterFactoryWrapper extends DelimitedPayloadTokenFilterFactory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename it to something like LegacyDelimitedPayloadTokenFilterFactory
but other than that, this is indeed the approach I was thinking of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
ced2441
to
45f6aed
Compare
Hi @cbuescher Could you please review again? Thanks in advance. |
|
||
==== The `delimited_payload_filter` is deprecated | ||
|
||
The `delimited_payload_filter` is deprecated and should be replaced by `delimited_payload`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should make it clearer that the filter is just renamed, and its only the old name that is deprecated, something like "The delimited_payload_filter
is renamed to delimited_payload
, the old name is deprecated and will be removed at some point, so it should be replaces by delimited_payload
" or slightly different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liketic thanks, this looks also good to me. I left a tiny comment regarding the migration note but other than that I agree this is ready. I will kick off the remaining CI tests once this small change has been adressed and will continue to merge after CI is green.
f8e3e3f
to
d3e6cfb
Compare
@cbuescher Thanks for your help. I pushed d3e6cfb . 👍 |
@liketic thanks a lot for the last change |
@liketic seems like there are still some checkstyle conventions that CI is complaining about now, sorry about that:
btw. you can run |
@cbuescher My fault. Please test again. Thanks! |
@elasticmachine test this please |
@liketic thanks, the checkstyle etc... passes now, the current errors seem unrelated to this PR but I'd still like to try to get a clean run. Would you be able to merge in master once more so we get a current state there? |
@elasticmachine test this please |
* es/master: (38 commits) Backport wait_for_initialiazing_shards to cluster health API Carry over version map size to prevent excessive resizing (#27516) Fix scroll query with a sort that is a prefix of the index sort (#27498) Delete shard store files before restoring a snapshot (#27476) Replace `delimited_payload_filter` by `delimited_payload` (#26625) CURRENT should not be a -SNAPSHOT version if build.snapshot is false (#27512) Fix merging of _meta field (#27352) Remove unused method (#27508) unmuted test, this has been fixed by #27397 Consolidate version numbering semantics (#27397) Add wait_for_no_initializing_shards to cluster health API (#27489) [TEST] use routing partition size based on the max routing shards of the second split Adjust CombinedDeletionPolicy for multiple commits (#27456) Update composite-aggregation.asciidoc Deprecate `levenstein` in favor of `levenshtein` (#27409) Automatically prepare indices for splitting (#27451) Validate `op_type` for `_create` (#27483) Minor ShapeBuilder cleanup muted test Decouple nio constructs from the tcp transport (#27484) ...
I added the following in elastic/elasticsearch/migration/migrate_7_0.asciidoc to address documentation build errors (commit af971b3 ):
|
@lcawl thanks for fixing this and sorry I didn't catch this in the review. |
No problem, it was a quick fix! |
I think we should deprecate in 6.x and remove in 7.0, but still allow the old form in 7.0 for indices created in 6.x. Also, we should add a check for this to the x-pack migration assistant. |
) The `delimited_payload_filter` is renamed to `delimited_payload`, the old name is deprecated and should be replaced by `delimited_payload`. Closes elastic#21978
The `delimited_payload_filter` is renamed to `delimited_payload`, the old name is deprecated and should be replaced by `delimited_payload`. Closes #21978
@clintongormley I opened #27704 for the final removal in 7.0 and adding checks to the migration assistant. |
…r is used (#43684) #26625 deprecated delimited_payload_filter and added tests to check that warnings would be emitted when both a normal and pre-configured filter were used. Unfortunately, due to a bug in the Analyze API, the pre- configured filter check was never actually triggered, and it turns out that the deprecation warning was not in fact being emitted in this case. #43568 fixed the Analyze API bug, which then surfaced this on backport. This commit ensures that the preconfigured filter also emits the warnings and triggers an error if a new index tries to use a preconfigured delimited_payload_filter
Closes #21978 . Any comments are appreciated. 😄