Skip to content

Commit

Permalink
Fix elastic#2611 remove the include_in_all mapping parameter (elastic…
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarz authored and awelburn committed Nov 6, 2017
1 parent bd371c1 commit 2498848
Show file tree
Hide file tree
Showing 34 changed files with 5 additions and 125 deletions.
2 changes: 0 additions & 2 deletions src/Nest/Mapping/Types/Core/Date/DateAttribute.cs
Expand Up @@ -11,15 +11,13 @@ public class DateAttribute : ElasticsearchDocValuesPropertyAttributeBase, IDateP
bool? IDateProperty.Index { get; set; }
double? IDateProperty.Boost { get; set; }
DateTime? IDateProperty.NullValue { get; set; }
bool? IDateProperty.IncludeInAll { get; set; }
bool? IDateProperty.IgnoreMalformed { get; set; }
string IDateProperty.Format { get; set; }
INumericFielddata IDateProperty.Fielddata { get; set; }

public bool Index { get { return Self.Index.GetValueOrDefault(); } set { Self.Index = value; } }
public double Boost { get { return Self.Boost.GetValueOrDefault(); } set { Self.Boost = value; } }
public DateTime NullValue { get { return Self.NullValue.GetValueOrDefault(); } set { Self.NullValue = value; } }
public bool IncludeInAll { get { return Self.IncludeInAll.GetValueOrDefault(); } set { Self.IncludeInAll = value; } }
public bool IgnoreMalformed { get { return Self.IgnoreMalformed.GetValueOrDefault(); } set { Self.IgnoreMalformed = value; } }
public string Format { get { return Self.Format; } set { Self.Format = value; } }

Expand Down
8 changes: 0 additions & 8 deletions src/Nest/Mapping/Types/Core/Date/DateProperty.cs
Expand Up @@ -27,9 +27,6 @@ public interface IDateProperty : IDocValuesProperty
[JsonProperty("null_value")]
DateTime? NullValue { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

/// <summary>
/// If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception
/// and reject the whole document.
Expand Down Expand Up @@ -60,8 +57,6 @@ public class DateProperty : DocValuesPropertyBase, IDateProperty
/// <inheritdoc/>
public DateTime? NullValue { get; set; }
/// <inheritdoc/>
public bool? IncludeInAll { get; set; }
/// <inheritdoc/>
public int? PrecisionStep { get; set; }
/// <inheritdoc/>
public bool? IgnoreMalformed { get; set; }
Expand All @@ -79,7 +74,6 @@ public class DatePropertyDescriptor<T>
bool? IDateProperty.Index { get; set; }
double? IDateProperty.Boost { get; set; }
DateTime? IDateProperty.NullValue { get; set; }
bool? IDateProperty.IncludeInAll { get; set; }
bool? IDateProperty.IgnoreMalformed { get; set; }
string IDateProperty.Format { get; set; }
INumericFielddata IDateProperty.Fielddata { get; set; }
Expand All @@ -93,8 +87,6 @@ public class DatePropertyDescriptor<T>
/// <inheritdoc/>
public DatePropertyDescriptor<T> NullValue(DateTime nullValue) => Assign(a => a.NullValue = nullValue);
/// <inheritdoc/>
public DatePropertyDescriptor<T> IncludeInAll(bool includeInAll = true) => Assign(a => a.IncludeInAll = includeInAll);
/// <inheritdoc/>
public DatePropertyDescriptor<T> IgnoreMalformed(bool ignoreMalformed = true) => Assign(a => a.IgnoreMalformed = ignoreMalformed);
/// <inheritdoc/>
public DatePropertyDescriptor<T> Format(string format) => Assign(a => a.Format = format);
Expand Down
2 changes: 0 additions & 2 deletions src/Nest/Mapping/Types/Core/Keyword/KeywordAttribute.cs
Expand Up @@ -15,7 +15,6 @@ public class KeywordAttribute : ElasticsearchDocValuesPropertyAttributeBase, IKe
double? IKeywordProperty.Boost { get; set; }
bool? IKeywordProperty.EagerGlobalOrdinals { get; set; }
int? IKeywordProperty.IgnoreAbove { get; set; }
bool? IKeywordProperty.IncludeInAll { get; set; }
bool? IKeywordProperty.Index { get; set; }
IndexOptions? IKeywordProperty.IndexOptions { get; set; }
bool? IKeywordProperty.Norms { get; set; }
Expand All @@ -25,7 +24,6 @@ public class KeywordAttribute : ElasticsearchDocValuesPropertyAttributeBase, IKe
public double Boost { get { return Self.Boost.GetValueOrDefault(); } set { Self.Boost = value; } }
public bool EagerGlobalOrdinals { get { return Self.EagerGlobalOrdinals.GetValueOrDefault(); } set { Self.EagerGlobalOrdinals = value; } }
public int IgnoreAbove { get { return Self.IgnoreAbove.GetValueOrDefault(); } set { Self.IgnoreAbove = value; } }
public bool IncludeInAll { get { return Self.IncludeInAll.GetValueOrDefault(); } set { Self.IncludeInAll = value; } }
public bool Index { get { return Self.Index.GetValueOrDefault(); } set { Self.Index = value; } }
public IndexOptions IndexOptions { get { return Self.IndexOptions.GetValueOrDefault(); } set { Self.IndexOptions = value; } }
public string NullValue { get { return Self.NullValue; } set { Self.NullValue = value; } }
Expand Down
6 changes: 0 additions & 6 deletions src/Nest/Mapping/Types/Core/Keyword/KeywordProperty.cs
Expand Up @@ -20,9 +20,6 @@ public interface IKeywordProperty : IDocValuesProperty
[JsonProperty("ignore_above")]
int? IgnoreAbove { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

[JsonProperty("index")]
bool? Index { get; set; }

Expand All @@ -47,7 +44,6 @@ public class KeywordProperty : DocValuesPropertyBase, IKeywordProperty
public double? Boost { get; set; }
public bool? EagerGlobalOrdinals { get; set; }
public int? IgnoreAbove { get; set; }
public bool? IncludeInAll { get; set; }
public bool? Index { get; set; }
public IndexOptions? IndexOptions { get; set; }
public bool? Norms { get; set; }
Expand All @@ -63,7 +59,6 @@ public class KeywordPropertyDescriptor<T>
double? IKeywordProperty.Boost { get; set; }
bool? IKeywordProperty.EagerGlobalOrdinals{ get; set; }
int? IKeywordProperty.IgnoreAbove{ get; set; }
bool? IKeywordProperty.IncludeInAll{ get; set; }
bool? IKeywordProperty.Index{ get; set; }
IndexOptions? IKeywordProperty.IndexOptions{ get; set; }
bool? IKeywordProperty.Norms{ get; set; }
Expand All @@ -75,7 +70,6 @@ public class KeywordPropertyDescriptor<T>
public KeywordPropertyDescriptor<T> Boost(double boost) => Assign(a => a.Boost = boost);
public KeywordPropertyDescriptor<T> EagerGlobalOrdinals(bool eagerGlobalOrdinals = true) => Assign(a => a.EagerGlobalOrdinals = eagerGlobalOrdinals);
public KeywordPropertyDescriptor<T> IgnoreAbove(int ignoreAbove) => Assign(a => a.IgnoreAbove = ignoreAbove);
public KeywordPropertyDescriptor<T> IncludeInAll(bool includeInAll = true) => Assign(a => a.IncludeInAll = includeInAll);
public KeywordPropertyDescriptor<T> Index(bool index = true) => Assign(a => a.Index = index);
public KeywordPropertyDescriptor<T> IndexOptions(IndexOptions indexOptions) => Assign(a => a.IndexOptions = indexOptions);
public KeywordPropertyDescriptor<T> Norms(bool enabled = true) => Assign(a => a.Norms = enabled);
Expand Down
2 changes: 0 additions & 2 deletions src/Nest/Mapping/Types/Core/Number/NumberAttribute.cs
Expand Up @@ -19,7 +19,6 @@ public class NumberAttribute : ElasticsearchDocValuesPropertyAttributeBase, INum
bool? INumberProperty.Index { get; set; }
double? INumberProperty.Boost { get; set; }
double? INumberProperty.NullValue { get; set; }
bool? INumberProperty.IncludeInAll { get; set; }
bool? INumberProperty.IgnoreMalformed { get; set; }
bool? INumberProperty.Coerce { get; set; }
INumericFielddata INumberProperty.Fielddata { get; set; }
Expand All @@ -28,7 +27,6 @@ public class NumberAttribute : ElasticsearchDocValuesPropertyAttributeBase, INum
public bool Index { get { return Self.Index.GetValueOrDefault(); } set { Self.Index = value; } }
public double Boost { get { return Self.Boost.GetValueOrDefault(); } set { Self.Boost = value; } }
public double NullValue { get { return Self.NullValue.GetValueOrDefault(); } set { Self.NullValue = value; } }
public bool IncludeInAll { get { return Self.IncludeInAll.GetValueOrDefault(); } set { Self.IncludeInAll = value; } }
public bool IgnoreMalformed { get { return Self.IgnoreMalformed.GetValueOrDefault(); } set { Self.IgnoreMalformed = value; } }
public bool Coerce { get { return Self.Coerce.GetValueOrDefault(); } set { Self.Coerce = value; } }
public double ScalingFactor { get { return Self.ScalingFactor.GetValueOrDefault(); } set { Self.ScalingFactor = value; } }
Expand Down
9 changes: 0 additions & 9 deletions src/Nest/Mapping/Types/Core/Number/NumberProperty.cs
Expand Up @@ -17,9 +17,6 @@ public interface INumberProperty : IDocValuesProperty
[JsonProperty("null_value")]
double? NullValue { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

[JsonProperty("ignore_malformed")]
bool? IgnoreMalformed { get; set; }

Expand All @@ -38,13 +35,10 @@ public class NumberProperty : DocValuesPropertyBase, INumberProperty
{
public NumberProperty() : base(FieldType.Float) { }
public NumberProperty(NumberType type) : base(type.ToFieldType()) { }
[Obsolete("Please use overload taking NumberType")]
protected NumberProperty(string type) : base(type) { }

public bool? Index { get; set; }
public double? Boost { get; set; }
public double? NullValue { get; set; }
public bool? IncludeInAll { get; set; }
public bool? IgnoreMalformed { get; set; }
public bool? Coerce { get; set; }
public INumericFielddata Fielddata { get; set; }
Expand All @@ -66,7 +60,6 @@ public abstract class NumberPropertyDescriptorBase<TDescriptor, TInterface, T>
bool? INumberProperty.Index { get; set; }
double? INumberProperty.Boost { get; set; }
double? INumberProperty.NullValue { get; set; }
bool? INumberProperty.IncludeInAll { get; set; }
bool? INumberProperty.IgnoreMalformed { get; set; }
bool? INumberProperty.Coerce { get; set; }
INumericFielddata INumberProperty.Fielddata { get; set; }
Expand All @@ -80,8 +73,6 @@ public abstract class NumberPropertyDescriptorBase<TDescriptor, TInterface, T>

public TDescriptor NullValue(double nullValue) => Assign(a => a.NullValue = nullValue);

public TDescriptor IncludeInAll(bool includeInAll = true) => Assign(a => a.IncludeInAll = includeInAll);

public TDescriptor IgnoreMalformed(bool ignoreMalformed = true) => Assign(a => a.IgnoreMalformed = ignoreMalformed);

public TDescriptor Coerce(bool coerce = true) => Assign(a => a.Coerce = coerce);
Expand Down
Expand Up @@ -11,12 +11,10 @@ public abstract class RangePropertyAttributeBase : ElasticsearchDocValuesPropert

public bool Index { get { return Self.Index.GetValueOrDefault(); } set { Self.Index = value; } }
public double Boost { get { return Self.Boost.GetValueOrDefault(); } set { Self.Boost = value; } }
public bool IncludeInAll { get { return Self.IncludeInAll.GetValueOrDefault(); } set { Self.IncludeInAll = value; } }
public bool Coerce { get { return Self.Coerce.GetValueOrDefault(); } set { Self.Coerce = value; } }

bool? IRangeProperty.Coerce { get; set; }
double? IRangeProperty.Boost { get; set; }
bool? IRangeProperty.IncludeInAll { get; set; }
bool? IRangeProperty.Index { get; set; }
}
}
5 changes: 0 additions & 5 deletions src/Nest/Mapping/Types/Core/Range/RangePropertyBase.cs
Expand Up @@ -25,8 +25,6 @@ public interface IRangeProperty : IDocValuesProperty
/// to false if index is set to false, or if a parent object field sets include_in_all to false.
/// Otherwise defaults to true.
/// </summary>
[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

/// <summary>
/// Should the field be searchable? Accepts true (default) and false.
Expand Down Expand Up @@ -57,7 +55,6 @@ public abstract class RangePropertyDescriptorBase<TDescriptor, TInterface, T>
{
bool? IRangeProperty.Coerce { get; set; }
double? IRangeProperty.Boost { get; set; }
bool? IRangeProperty.IncludeInAll { get; set; }
bool? IRangeProperty.Index { get; set; }

protected RangePropertyDescriptorBase(RangeType type) : base(type.ToFieldType()) { }
Expand All @@ -67,8 +64,6 @@ public abstract class RangePropertyDescriptorBase<TDescriptor, TInterface, T>
/// <inheritdoc/>
public TDescriptor Boost(double boost) => Assign(a => a.Boost = boost);
/// <inheritdoc/>
public TDescriptor IncludeInAll(bool includeInAll = true) => Assign(a => a.IncludeInAll = includeInAll);
/// <inheritdoc/>
public TDescriptor Index(bool index = true) => Assign(a => a.Index = index);
}
}
2 changes: 0 additions & 2 deletions src/Nest/Mapping/Types/Core/String/StringAttribute.cs
Expand Up @@ -15,15 +15,13 @@ public class StringAttribute : ElasticsearchDocValuesPropertyAttributeBase, IStr
IndexOptions? IStringProperty.IndexOptions { get; set; }
string IStringProperty.Analyzer { get; set; }
string IStringProperty.SearchAnalyzer { get; set; }
bool? IStringProperty.IncludeInAll { get; set; }
int? IStringProperty.IgnoreAbove { get; set; }
int? IStringProperty.PositionIncrementGap { get; set; }
IStringFielddata IStringProperty.Fielddata { get; set; }

public string Analyzer { get { return Self.Analyzer; } set { Self.Analyzer = value; } }
public double Boost { get { return Self.Boost.GetValueOrDefault(); } set { Self.Boost = value; } }
public int IgnoreAbove { get { return Self.IgnoreAbove.GetValueOrDefault(); } set { Self.IgnoreAbove = value; } }
public bool IncludeInAll { get { return Self.IncludeInAll.GetValueOrDefault(); } set { Self.IncludeInAll = value; } }
public FieldIndexOption Index { get { return Self.Index.GetValueOrDefault(); } set { Self.Index = value; } }
public IndexOptions IndexOptions { get { return Self.IndexOptions.GetValueOrDefault(); } set { Self.IndexOptions = value; } }
public string NullValue { get { return Self.NullValue; } set { Self.NullValue = value; } }
Expand Down
7 changes: 0 additions & 7 deletions src/Nest/Mapping/Types/Core/String/StringProperty.cs
Expand Up @@ -32,9 +32,6 @@ public interface IStringProperty : IDocValuesProperty
[JsonProperty("search_analyzer")]
string SearchAnalyzer { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

[JsonProperty("ignore_above")]
int? IgnoreAbove { get; set; }

Expand All @@ -59,7 +56,6 @@ public class StringProperty : DocValuesPropertyBase, IStringProperty
public IndexOptions? IndexOptions { get; set; }
public string Analyzer { get; set; }
public string SearchAnalyzer { get; set; }
public bool? IncludeInAll { get; set; }
public int? IgnoreAbove { get; set; }
public int? PositionIncrementGap { get; set; }
public IStringFielddata Fielddata { get; set; }
Expand All @@ -79,7 +75,6 @@ public class StringPropertyDescriptor<T>
IndexOptions? IStringProperty.IndexOptions { get; set; }
string IStringProperty.Analyzer { get; set; }
string IStringProperty.SearchAnalyzer { get; set; }
bool? IStringProperty.IncludeInAll { get; set; }
int? IStringProperty.IgnoreAbove { get; set; }
int? IStringProperty.PositionIncrementGap { get; set; }
IStringFielddata IStringProperty.Fielddata { get; set; }
Expand Down Expand Up @@ -109,8 +104,6 @@ public class StringPropertyDescriptor<T>

public StringPropertyDescriptor<T> IgnoreAbove(int ignoreAbove) => Assign(a => a.IgnoreAbove = ignoreAbove);

public StringPropertyDescriptor<T> IncludeInAll(bool includeInAll = true) => Assign(a => a.IncludeInAll = includeInAll);

public StringPropertyDescriptor<T> PositionIncrementGap(int positionIncrementGap) => Assign(a => a.PositionIncrementGap = positionIncrementGap);

public StringPropertyDescriptor<T> Fielddata(Func<StringFielddataDescriptor, IStringFielddata> selector) =>
Expand Down
2 changes: 0 additions & 2 deletions src/Nest/Mapping/Types/Core/Text/TextAttribute.cs
Expand Up @@ -17,7 +17,6 @@ public class TextAttribute : ElasticsearchCorePropertyAttributeBase, ITextProper
bool? ITextProperty.EagerGlobalOrdinals { get; set; }
bool? ITextProperty.Fielddata { get; set; }
IFielddataFrequencyFilter ITextProperty.FielddataFrequencyFilter { get; set; }
bool? ITextProperty.IncludeInAll { get; set; }
bool? ITextProperty.Index { get; set; }
IndexOptions? ITextProperty.IndexOptions { get; set; }
bool? ITextProperty.Norms { get; set; }
Expand All @@ -30,7 +29,6 @@ public class TextAttribute : ElasticsearchCorePropertyAttributeBase, ITextProper
public double Boost { get { return Self.Boost.GetValueOrDefault(); } set { Self.Boost = value; } }
public bool EagerGlobalOrdinals { get { return Self.EagerGlobalOrdinals.GetValueOrDefault(); } set { Self.EagerGlobalOrdinals = value; } }
public bool Fielddata { get { return Self.Fielddata.GetValueOrDefault(); } set { Self.Fielddata = value; } }
public bool IncludeInAll { get { return Self.IncludeInAll.GetValueOrDefault(); } set { Self.IncludeInAll = value; } }
public bool Index { get { return Self.Index.GetValueOrDefault(); } set { Self.Index = value; } }
public IndexOptions IndexOptions { get { return Self.IndexOptions.GetValueOrDefault(); } set { Self.IndexOptions = value; } }
public int PositionIncrementGap { get { return Self.PositionIncrementGap.GetValueOrDefault(); } set { Self.PositionIncrementGap = value; } }
Expand Down
6 changes: 0 additions & 6 deletions src/Nest/Mapping/Types/Core/Text/TextProperty.cs
Expand Up @@ -32,9 +32,6 @@ public interface ITextProperty : ICoreProperty
[JsonProperty("fielddata_frequency_filter")]
IFielddataFrequencyFilter FielddataFrequencyFilter { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

[JsonProperty("index")]
bool? Index { get; set; }

Expand All @@ -60,7 +57,6 @@ public class TextProperty : CorePropertyBase, ITextProperty
public bool? EagerGlobalOrdinals { get; set; }
public bool? Fielddata { get; set; }
public IFielddataFrequencyFilter FielddataFrequencyFilter { get; set; }
public bool? IncludeInAll { get; set; }
public bool? Index { get; set; }
public IndexOptions? IndexOptions { get; set; }
public bool? Norms { get; set; }
Expand All @@ -80,7 +76,6 @@ public class TextPropertyDescriptor<T>
bool? ITextProperty.EagerGlobalOrdinals { get; set; }
bool? ITextProperty.Fielddata { get; set; }
IFielddataFrequencyFilter ITextProperty.FielddataFrequencyFilter { get; set; }
bool? ITextProperty.IncludeInAll { get; set; }
bool? ITextProperty.Index { get; set; }
IndexOptions? ITextProperty.IndexOptions { get; set; }
bool? ITextProperty.Norms { get; set; }
Expand All @@ -97,7 +92,6 @@ public class TextPropertyDescriptor<T>
public TextPropertyDescriptor<T> Fielddata(bool fielddata = true) => Assign(a => a.Fielddata = fielddata);
public TextPropertyDescriptor<T> FielddataFrequencyFilter(Func<FielddataFrequencyFilterDescriptor, IFielddataFrequencyFilter> selector) =>
Assign(a => a.FielddataFrequencyFilter = selector?.Invoke(new FielddataFrequencyFilterDescriptor()));
public TextPropertyDescriptor<T> IncludeInAll(bool includeInAll = true) => Assign(a => a.IncludeInAll = includeInAll);
public TextPropertyDescriptor<T> Index(bool index = true) => Assign(a => a.Index = index);
public TextPropertyDescriptor<T> IndexOptions(IndexOptions indexOptions) => Assign(a => a.IndexOptions = indexOptions);
public TextPropertyDescriptor<T> Norms(bool enabled = true) => Assign(a => a.Norms = enabled);
Expand Down
2 changes: 0 additions & 2 deletions src/Nest/Mapping/Types/Specialized/Ip/IpAttribute.cs
Expand Up @@ -7,12 +7,10 @@ public class IpAttribute : ElasticsearchDocValuesPropertyAttributeBase, IIpPrope
public IpAttribute() : base(FieldType.Ip) { }

double? IIpProperty.Boost { get; set; }
bool? IIpProperty.IncludeInAll { get; set; }
bool? IIpProperty.Index { get; set; }
string IIpProperty.NullValue { get; set; }

public double Boost { get { return Self.Boost.GetValueOrDefault(); } set { Self.Boost = value; } }
public bool IncludeInAll { get { return Self.IncludeInAll.GetValueOrDefault(); } set { Self.IncludeInAll = value; } }
public bool Index { get { return Self.Index.GetValueOrDefault(); } set { Self.Index = value; } }
public string NullValue { get { return Self.NullValue; } set { Self.NullValue = value; } }

Expand Down
7 changes: 0 additions & 7 deletions src/Nest/Mapping/Types/Specialized/Ip/IpProperty.cs
Expand Up @@ -14,9 +14,6 @@ public interface IIpProperty : IDocValuesProperty

[JsonProperty("null_value")]
string NullValue { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }
}

[DebuggerDisplay("{DebugDisplay}")]
Expand All @@ -25,7 +22,6 @@ public class IpProperty : DocValuesPropertyBase, IIpProperty
public IpProperty() : base(FieldType.Ip) { }

public double? Boost { get; set; }
public bool? IncludeInAll { get; set; }
public bool? Index { get; set; }
public string NullValue { get; set; }
}
Expand All @@ -38,7 +34,6 @@ public class IpPropertyDescriptor<T>
bool? IIpProperty.Index { get; set; }
double? IIpProperty.Boost { get; set; }
string IIpProperty.NullValue { get; set; }
bool? IIpProperty.IncludeInAll { get; set; }

public IpPropertyDescriptor() : base(FieldType.Ip) { }

Expand All @@ -47,7 +42,5 @@ public class IpPropertyDescriptor<T>
public IpPropertyDescriptor<T> Boost(double boost) => Assign(a => a.Boost = boost);

public IpPropertyDescriptor<T> NullValue(string nullValue) => Assign(a => a.NullValue = nullValue);

public IpPropertyDescriptor<T> IncludeInAll(bool includeInAll = true) => Assign(a => a.IncludeInAll = includeInAll);
}
}

0 comments on commit 2498848

Please sign in to comment.