Skip to content

Commit

Permalink
Remove deprecated SimpleQueryStringBuilder parameters (#57200)
Browse files Browse the repository at this point in the history
The `lowercase_expand_terms`, `locale` and `all_fields` parameters for
`simple_query_string` have been deprecated and a no-op for at least until 6.0
so we can remove them in 8.0
  • Loading branch information
Christoph Büscher committed May 28, 2020
1 parent 3d4f9fe commit 4e8134c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
4 changes: 0 additions & 4 deletions docs/reference/query-dsl/simple-query-string-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ For example, a query string of `capital of Hungary` is interpreted as `capital
AND of AND Hungary`.
--

`all_fields`::
deprecated:[6.0.0, set `fields` to `*` instead](Optional, boolean) If `true`,
search all searchable fields in the index's field mapping.

`analyze_wildcard`::
(Optional, boolean) If `true`, the query attempts to analyze wildcard terms in
the query string. Defaults to `false`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,12 @@ public class SimpleQueryStringBuilder extends AbstractQueryBuilder<SimpleQuerySt
private static final ParseField MINIMUM_SHOULD_MATCH_FIELD = new ParseField("minimum_should_match");
private static final ParseField ANALYZE_WILDCARD_FIELD = new ParseField("analyze_wildcard");
private static final ParseField LENIENT_FIELD = new ParseField("lenient");
private static final ParseField LOWERCASE_EXPANDED_TERMS_FIELD = new ParseField("lowercase_expanded_terms")
.withAllDeprecated("Decision is now made by the analyzer");
private static final ParseField LOCALE_FIELD = new ParseField("locale")
.withAllDeprecated("Decision is now made by the analyzer");
private static final ParseField FLAGS_FIELD = new ParseField("flags");
private static final ParseField DEFAULT_OPERATOR_FIELD = new ParseField("default_operator");
private static final ParseField ANALYZER_FIELD = new ParseField("analyzer");
private static final ParseField QUERY_FIELD = new ParseField("query");
private static final ParseField FIELDS_FIELD = new ParseField("fields");
private static final ParseField QUOTE_FIELD_SUFFIX_FIELD = new ParseField("quote_field_suffix");
private static final ParseField ALL_FIELDS_FIELD = new ParseField("all_fields")
.withAllDeprecated("Set [fields] to `*` instead");
private static final ParseField GENERATE_SYNONYMS_PHRASE_QUERY = new ParseField("auto_generate_synonyms_phrase_query");
private static final ParseField FUZZY_PREFIX_LENGTH_FIELD = new ParseField("fuzzy_prefix_length");
private static final ParseField FUZZY_MAX_EXPANSIONS_FIELD = new ParseField("fuzzy_max_expansions");
Expand Down Expand Up @@ -522,10 +516,6 @@ public static SimpleQueryStringBuilder fromXContent(XContentParser parser) throw
flags = SimpleQueryStringFlag.ALL.value();
}
}
} else if (LOCALE_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
// ignore, deprecated setting
} else if (LOWERCASE_EXPANDED_TERMS_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
// ignore, deprecated setting
} else if (LENIENT_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
lenient = parser.booleanValue();
} else if (ANALYZE_WILDCARD_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
Expand All @@ -536,8 +526,6 @@ public static SimpleQueryStringBuilder fromXContent(XContentParser parser) throw
minimumShouldMatch = parser.textOrNull();
} else if (QUOTE_FIELD_SUFFIX_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
quoteFieldSuffix = parser.textOrNull();
} else if (ALL_FIELDS_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
// Ignore deprecated option
} else if (GENERATE_SYNONYMS_PHRASE_QUERY.match(currentFieldName, parser.getDeprecationHandler())) {
autoGenerateSynonymsPhraseQuery = parser.booleanValue();
} else if (FUZZY_PREFIX_LENGTH_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
Expand Down

0 comments on commit 4e8134c

Please sign in to comment.