Skip to content

Commit

Permalink
The all_fields parameter for the query_string has been removed. Also …
Browse files Browse the repository at this point in the history
…removed from simple_query_string.
  • Loading branch information
codebrain committed Dec 6, 2017
1 parent a4343e3 commit 941acd0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
7 changes: 0 additions & 7 deletions src/Nest/QueryDsl/FullText/QueryString/QueryStringQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ public interface IQueryStringQuery : IQuery

[JsonProperty("escape")]
bool? Escape { get; set; }

[JsonProperty("all_fields")]
bool? AllFields { get; set; }
}

public class QueryStringQuery : QueryBase, IQueryStringQuery
Expand Down Expand Up @@ -115,7 +112,6 @@ public class QueryStringQuery : QueryBase, IQueryStringQuery
public bool? AnalyzeWildcard { get; set; }
public double? TieBreaker { get; set; }
public int? MaximumDeterminizedStates { get; set; }
public bool? AllFields { get; set; }

internal override void InternalWrapInContainer(IQueryContainer c) => c.QueryString = this;
internal static bool IsConditionless(IQueryStringQuery q) => q.Query.IsNullOrEmpty();
Expand Down Expand Up @@ -154,7 +150,6 @@ public class QueryStringQueryDescriptor<T>
MultiTermQueryRewrite IQueryStringQuery.Rewrite { get; set; }
string IQueryStringQuery.QuoteFieldSuffix { get; set; }
bool? IQueryStringQuery.Escape { get; set; }
bool? IQueryStringQuery.AllFields { get; set; }

public QueryStringQueryDescriptor<T> DefaultField(Field field) => Assign(a => a.DefaultField = field);
public QueryStringQueryDescriptor<T> DefaultField(Expression<Func<T, object>> field) => Assign(a => a.DefaultField = field);
Expand Down Expand Up @@ -213,7 +208,5 @@ public QueryStringQueryDescriptor<T> QuoteFieldSuffix(string quoteFieldSuffix) =
Assign(a => a.QuoteFieldSuffix = quoteFieldSuffix);

public QueryStringQueryDescriptor<T> Escape(bool? escape = true) => Assign(a => a.Escape = escape);

public QueryStringQueryDescriptor<T> AllFields(bool? allFields = true) => Assign(a => a.AllFields = allFields);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ public interface ISimpleQueryStringQuery : IQuery

[JsonProperty("quote_field_suffix")]
string QuoteFieldSuffix { get; set; }

[JsonProperty("all_fields")]
bool? AllFields { get; set; }
}

public class SimpleQueryStringQuery : QueryBase, ISimpleQueryStringQuery
Expand All @@ -62,7 +59,6 @@ public class SimpleQueryStringQuery : QueryBase, ISimpleQueryStringQuery
public bool? AnalyzeWildcard { get; set; }
public MinimumShouldMatch MinimumShouldMatch { get; set; }
public string QuoteFieldSuffix { get; set; }
public bool? AllFields { get; set; }

internal override void InternalWrapInContainer(IQueryContainer c) => c.SimpleQueryString = this;
internal static bool IsConditionless(ISimpleQueryStringQuery q) => q.Query.IsNullOrEmpty();
Expand All @@ -86,7 +82,6 @@ public class SimpleQueryStringQueryDescriptor<T>
bool? ISimpleQueryStringQuery.Lenient { get; set; }
MinimumShouldMatch ISimpleQueryStringQuery.MinimumShouldMatch { get; set; }
string ISimpleQueryStringQuery.QuoteFieldSuffix { get; set; }
bool? ISimpleQueryStringQuery.AllFields { get; set; }

public SimpleQueryStringQueryDescriptor<T> Fields(Func<FieldsDescriptor<T>, IPromise<Fields>> fields) =>
Assign(a => a.Fields = fields?.Invoke(new FieldsDescriptor<T>())?.Value);
Expand Down Expand Up @@ -118,8 +113,5 @@ public SimpleQueryStringQueryDescriptor<T> MinimumShouldMatch(MinimumShouldMatch

public SimpleQueryStringQueryDescriptor<T> QuoteFieldSuffix(string quoteFieldSuffix) =>
Assign(a => a.QuoteFieldSuffix = quoteFieldSuffix);

public SimpleQueryStringQueryDescriptor<T> AllFields(bool? allFields = true) =>
Assign(a => a.AllFields = allFields);
}
}

1 comment on commit 941acd0

@russcam
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codebrain In cases where properties (and associated fluent methods) are removed in 6.x, we've also added the ObsoleteAttribute with an appropriate description to the 5.x client e.g.

[Obsolete("Removed in Elasticsearch 6.0.")]
bool? AllFields { get; set; }

This gives users a heads up when upgrading.

Please sign in to comment.