Convert TextFieldMapper to parametrized form#63269
Convert TextFieldMapper to parametrized form#63269romseygeek merged 12 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-search (:Search/Mapping) |
nik9000
left a comment
There was a problem hiding this comment.
Everything seems in order. I've not looked as closely as I maybe should - I'm trusting @romseygeek and tests to cover sneaky stuff. The less obvious changes that I saw all make good sense to me.
| } | ||
| this.positionIncrementGap = positionIncrementGap; | ||
| return this; | ||
| final TextParams.Analyzers analyzers; |
There was a problem hiding this comment.
Could you move this below all the Parameter so I don't lose it?
| //Check "=" sign wasn't in the pair string | ||
| if(kv[0].length() == pair.length()) { | ||
| //untyped value | ||
| value = URLDecoder.decode(kv[0], StandardCharsets.UTF_8); |
| .addDeprecatedName("max_input_len") | ||
| .setValidator(Builder::validateInputLength) | ||
| .alwaysSerialize(); | ||
| .setSerializerCheck((id, ic, v) -> true); |
There was a problem hiding this comment.
I wonder if alwaysSerialize should a shortcut to this new thing - it is easier for me to read the intent of alwaysSerialize than this lambda.
There was a problem hiding this comment.
I added alwaysSerialize and neverSerialize as shortcuts.
| return isSet ? value : defaultValue.get(); | ||
| } | ||
|
|
||
| @Override |
There was a problem hiding this comment.
Are you thinking of removing the old getValue in a follow up?
There was a problem hiding this comment.
That's the plan, yes
| return new PrefixConfig(minChars, maxChars); | ||
| } | ||
|
|
||
| private static final class FielddataFrequencyFilter implements ToXContent { |
|
@elasticmachine update branch |
c443d8b to
33dde51
Compare
|
BWC issues with serialization mean that I've had to override |
|
@elasticmachine update branch |
7aa6e71 to
7734125
Compare
As a result of this, we can remove a chunk of code from TypeParsers as well. Tests for search/index mode analyzers have moved into their own file. This commit also rationalises the serialization checks for parameters into a single SerializerCheck interface that takes the values includeDefaults, isConfigured and the value itself. Relates to elastic#62988
As a result of this, we can remove a chunk of code from TypeParsers as well. Tests for search/index mode analyzers have moved into their own file. This commit also rationalises the serialization checks for parameters into a single SerializerCheck interface that takes the values includeDefaults, isConfigured and the value itself. Relates to #62988
As a result of this, we can remove a chunk of code from
TypeParsersas well. Testsfor search/index mode analyzers have moved into their own file. This commit also
rationalises the serialization checks for parameters into a single
SerializerCheckinterface that takes the values
includeDefaults,isConfiguredand the valueitself.
Relates to #62988