-
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
Changes from 1 commit
7704d34
7e7c54d
706955c
194d56c
45f6aed
d3e6cfb
f1d33f2
9df8254
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[[breaking_70_analysis_changes]] | ||
=== Analysis changes | ||
|
||
==== The `delimited_payload_filter` is deprecated | ||
|
||
The `delimited_payload_filter` is deprecated and should be replaced by `delimited_payload`. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,9 @@ public Map<String, AnalysisProvider<TokenFilterFactory>> getTokenFilters() { | |
filters.put("czech_stem", CzechStemTokenFilterFactory::new); | ||
filters.put("common_grams", requriesAnalysisSettings(CommonGramsTokenFilterFactory::new)); | ||
filters.put("decimal_digit", DecimalDigitFilterFactory::new); | ||
// TODO deprecate delimited_payload_filter | ||
filters.put("delimited_payload_filter", DelimitedPayloadTokenFilterFactory::new); | ||
filters.put("delimited_payload", DelimitedPayloadTokenFilterFactory::new); | ||
filters.put("dictionary_decompounder", requriesAnalysisSettings(DictionaryCompoundWordTokenFilterFactory::new)); | ||
filters.put("dutch_stem", DutchStemTokenFilterFactory::new); | ||
filters.put("edge_ngram", EdgeNGramTokenFilterFactory::new); | ||
|
@@ -191,10 +193,15 @@ public List<PreConfiguredTokenFilter> getPreConfiguredTokenFilters() { | |
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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. I pushed 7e7c54d |
||
filters.add(PreConfiguredTokenFilter.singleton("delimited_payload_filter", false, input -> | ||
new DelimitedPayloadTokenFilter(input, | ||
DelimitedPayloadTokenFilterFactory.DEFAULT_DELIMITER, | ||
DelimitedPayloadTokenFilterFactory.DEFAULT_ENCODER))); | ||
filters.add(PreConfiguredTokenFilter.singleton("delimited_payload", false, input -> | ||
new DelimitedPayloadTokenFilter(input, | ||
DelimitedPayloadTokenFilterFactory.DEFAULT_DELIMITER, | ||
DelimitedPayloadTokenFilterFactory.DEFAULT_ENCODER))); | ||
filters.add(PreConfiguredTokenFilter.singleton("dutch_stem", false, input -> new SnowballFilter(input, new DutchStemmer()))); | ||
filters.add(PreConfiguredTokenFilter.singleton("edge_ngram", false, input -> | ||
new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.DEFAULT_MIN_GRAM_SIZE, EdgeNGramTokenFilter.DEFAULT_MAX_GRAM_SIZE))); | ||
|
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 todelimited_payload
, the old name is deprecated and will be removed at some point, so it should be replaces bydelimited_payload
" or slightly different.