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

Remove all instances of the deprecated ParseField.match method #28586

Merged
merged 1 commit into from
Feb 9, 2018

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Feb 8, 2018

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 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);
Copy link
Member

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.

Copy link
Member

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);
Copy link
Member

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));
Copy link
Member

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.

@dakrone dakrone merged commit 5263b8c into elastic:master Feb 9, 2018
dakrone added a commit that referenced this pull request Feb 9, 2018
)

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
@dakrone dakrone deleted the remove-dep-parsefield-match branch April 19, 2018 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants