-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Remove all instances of the deprecated ParseField.match
method
#28586
Conversation
This removes all the server references to the deprecated `ParseField.match` method in favor of the method that passes in the deprecation logger. Relates to elastic#28504
@@ -51,7 +51,7 @@ public static XContentParser createParser(NamedXContentRegistry xContentRegistry | |||
compressedInput = new BufferedInputStream(compressedInput); | |||
} | |||
final XContentType contentType = XContentFactory.xContentType(compressedInput); | |||
return XContentFactory.xContent(contentType).createParser(xContentRegistry, compressedInput); | |||
return XContentFactory.xContent(contentType).createParser(xContentRegistry, LoggingDeprecationHandler.INSTANCE, compressedInput); |
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.
+1 for doing it this way. I think that this'll make extracting this class from core into an xcontent jar more difficult but I think we should cross that bridge in another PR.
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 it doesn't have to come at all.... I think only copyCurrentStructure
is part of the xcontent implementation. The rest is just "stuff that ES uses". I think.
@@ -326,7 +328,7 @@ public MultiMatchQueryBuilder type(Object type) { | |||
if (type == null) { | |||
throw new IllegalArgumentException("[" + NAME + "] requires type to be non-null"); | |||
} | |||
this.type = Type.parse(type.toString().toLowerCase(Locale.ROOT)); | |||
this.type = Type.parse(type.toString().toLowerCase(Locale.ROOT), LoggingDeprecationHandler.INSTANCE); |
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.
++ for doing it this way for now.
@@ -1004,8 +1005,8 @@ protected Query doToQuery(QueryShardContext context) throws IOException { | |||
queryParser.setFuzziness(fuzziness); | |||
queryParser.setFuzzyPrefixLength(fuzzyPrefixLength); | |||
queryParser.setFuzzyMaxExpansions(fuzzyMaxExpansions); | |||
queryParser.setFuzzyRewriteMethod(QueryParsers.parseRewriteMethod(this.fuzzyRewrite)); | |||
queryParser.setMultiTermRewriteMethod(QueryParsers.parseRewriteMethod(this.rewrite)); | |||
queryParser.setFuzzyRewriteMethod(QueryParsers.parseRewriteMethod(this.fuzzyRewrite, LoggingDeprecationHandler.INSTANCE)); |
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.
Funky! It'll do though.
) This removes all the server references to the deprecated `ParseField.match` method in favor of the method that passes in the deprecation logger. Relates to #28504
This removes all the server references to the deprecated
ParseField.match
method in favor of the method that passes in the deprecation logger.
Relates to #28504